Skip to content

Commit

Permalink
Feature/upgrade springboot (#268)
Browse files Browse the repository at this point in the history
* update springboot to 2.1.18

* update springboot to 2.2.13

* Upgrade to srping boot 2.7.11

* Update changelog

* Update changelog

* fix version
  • Loading branch information
RickArt authored May 4, 2023
1 parent 553c5a4 commit 6c2510b
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 26 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
## [3.10.12] - 2023-05-04
### Changed
- Upgraded `springboot` version to `2.7.11` (was `2.0.4.RELEASE`).
- Added `spring-boot-starter-validation`.
- Added `waggledance.allow-bean-definition-overriding` property to configuration.
- Added `joda-time` version `2.9.9`.

## [3.10.11] - 2023-02-06
### Added
- Functionality to get tables from a database using a Glue federation. Code pulled from original AWS master branch.
- [Code](https://github.com/ExpediaGroup/aws-glue-data-catalog-client-for-apache-hive-metastore/commit/7f8f13681b09d07dafb57e6efdae457a5c6f6d7b)
- [Code](https://github.com/ExpediaGroup/aws-glue-data-catalog-client-for-apache-hive-metastore/commit/7f8f13681b09d07dafb57e6efdae457a5c6f6d7b)

## [3.10.10] - 2022-12-01
### Changed
Expand Down
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>
<maven.release.plugin.version>2.5.3</maven.release.plugin.version>
<spring-boot.version>2.0.4.RELEASE</spring-boot.version>
<spring-boot.version>2.7.11</spring-boot.version>
<hadoop.version>2.10.1</hadoop.version>
<hamcrest.version>2.2</hamcrest.version>
<hive.version>2.3.7</hive.version>
Expand All @@ -51,6 +51,7 @@
<hcommon-hive-metastore.version>1.2.3</hcommon-hive-metastore.version>
<jackson.version>2.9.8</jackson.version>
<jackson.databind.version>2.9.10.8</jackson.databind.version>
<joda-time.version>2.9.9</joda-time.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -262,6 +263,11 @@
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
8 changes: 8 additions & 0 deletions waggle-dance-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<!-- URL rewritter -->
<dependency>
Expand Down Expand Up @@ -93,6 +97,10 @@
<groupId>com.hotels</groupId>
<artifactId>hcommon-hive-metastore</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<!-- Test -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2019 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 4 additions & 0 deletions waggle-dance-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- DO NOT REMOVE: this is required by aspectj-maven-plugin to weave the aspects despite not being used in the project -->
<dependency>
<groupId>org.springframework</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2019 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,6 +67,7 @@ public static void main(String[] args) throws Exception {
SpringApplication application = new SpringApplicationBuilder(WaggleDance.class)
.properties("spring.config.location:${server-config:null},${federation-config:null}")
.properties("server.port:${endpoint.port:18000}")
.properties("spring.main.allow-bean-definition-overriding:${waggledance.allow-bean-definition-overriding:true}")
.registerShutdownHook(true)
.build();
exitCode = SpringApplication.exit(registerListeners(application).run(args));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2019 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2022 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,12 +26,10 @@
import com.hotels.bdp.waggledance.client.GlueClientFactory;
import com.hotels.bdp.waggledance.client.tunnelling.TunnelingMetaStoreClientFactory;
import com.hotels.bdp.waggledance.conf.WaggleDanceConfiguration;
import com.hotels.bdp.waggledance.core.federation.service.PopulateStatusFederationService;
import com.hotels.bdp.waggledance.mapping.model.ASTQueryMapping;
import com.hotels.bdp.waggledance.mapping.model.QueryMapping;
import com.hotels.bdp.waggledance.mapping.service.PrefixNamingStrategy;
import com.hotels.bdp.waggledance.mapping.service.impl.LowerCasePrefixNamingStrategy;
import com.hotels.bdp.waggledance.mapping.service.impl.PollingFederationService;

@org.springframework.context.annotation.Configuration
public class CommonBeans {
Expand Down Expand Up @@ -66,11 +64,4 @@ public CloseableThriftHiveMetastoreIfaceClientFactory metaStoreClientFactory(
public QueryMapping queryMapping() {
return ASTQueryMapping.INSTANCE;
}

@Bean
public PollingFederationService pollingFederationService(
PopulateStatusFederationService populateStatusFederationService) {
return new PollingFederationService(populateStatusFederationService);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2021 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2022 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,10 +43,12 @@ public class PollingFederationService {

private final PopulateStatusFederationService populateStatusFederationService;
private Map<String, MetaStoreStatus> previous = new HashMap<>();
private @Autowired MeterRegistry meterRegistry;
private MeterRegistry meterRegistry;

public PollingFederationService(PopulateStatusFederationService populateStatusFederationService) {
@Autowired
public PollingFederationService(PopulateStatusFederationService populateStatusFederationService, MeterRegistry meterRegistry) {
this.populateStatusFederationService = populateStatusFederationService;
this.meterRegistry = meterRegistry;
}

public void poll() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2020 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2020 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2016-2022 Expedia, Inc.
* Copyright (C) 2016-2023 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,15 +41,13 @@
public class PollingFederationServiceTest {

private @Mock PopulateStatusFederationService populateStatusFederationService;
private MeterRegistry meterRegistry;

private PollingFederationService service;

@Before
public void setUp() {
service = new PollingFederationService(populateStatusFederationService);
meterRegistry = new SimpleMeterRegistry();
service.setMeterRegistry(meterRegistry);
MeterRegistry meterRegistry = new SimpleMeterRegistry();
service = new PollingFederationService(populateStatusFederationService, meterRegistry);
}

@Test
Expand Down

0 comments on commit 6c2510b

Please sign in to comment.