Skip to content

Commit

Permalink
2.1 version bump and Gradle bump (#582)
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Galitzky <amgalitz@amazon.com>
  • Loading branch information
amitgalitz authored Jun 23, 2022
1 parent 03e04d7 commit 0e7079e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ buildscript {
ext {
opensearch_group = "org.opensearch"
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.1.0-SNAPSHOT")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
// 2.0.0-SNAPSHOT -> 2.0.0.0-SNAPSHOT
// 2.1.0-SNAPSHOT -> 2.1.0.0-SNAPSHOT
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
plugin_no_snapshot = opensearch_build
Expand Down Expand Up @@ -80,6 +80,7 @@ repositories {
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://d1nvenhzbhpy0q.cloudfront.net/snapshots/lucene/" }
}

apply plugin: 'java'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ClusterManagerEventListener(
}

@Override
public void onMaster() {
public void onClusterManager() {
if (hourlyCron == null) {
hourlyCron = threadPool.scheduleWithFixedDelay(new HourlyCron(client, nodeFilter), TimeValue.timeValueHours(1), executorName());
clusterService.addLifecycleListener(new LifecycleListener() {
Expand Down Expand Up @@ -88,7 +88,7 @@ public void beforeStop() {
}

@Override
public void offMaster() {
public void offClusterManager() {
cancel(hourlyCron);
cancel(checkpointIndexRetentionCron);
hourlyCron = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ public void initCheckpointIndex(ActionListener<CreateIndexResponse> actionListen
}

@Override
public void onMaster() {
public void onClusterManager() {
try {
// try to rollover immediately as we might be restarting the cluster
rolloverAndDeleteHistoryIndex();
Expand All @@ -692,7 +692,7 @@ public void onMaster() {
}

@Override
public void offMaster() {
public void offClusterManager() {
if (scheduledRollover != null) {
scheduledRollover.cancel();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/opensearch/ad/ODFERestTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOE
@After
protected void wipeAllODFEIndices() throws IOException {
Response response = adminClient().performRequest(new Request("GET", "/_cat/indices?format=json&expand_wildcards=all"));
XContentType xContentType = XContentType.fromMediaTypeOrFormat(response.getEntity().getContentType().getValue());
XContentType xContentType = XContentType.fromMediaType(response.getEntity().getContentType().getValue());
try (
XContentParser parser = xContentType
.xContent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ public void setUp() throws Exception {
}

public void testOnOffMaster() {
clusterManagerService.onMaster();
clusterManagerService.onClusterManager();
assertThat(hourlyCancellable, is(notNullValue()));
assertThat(checkpointIndexRetentionCancellable, is(notNullValue()));
assertTrue(!clusterManagerService.getHourlyCron().isCancelled());
assertTrue(!clusterManagerService.getCheckpointIndexRetentionCron().isCancelled());
clusterManagerService.offMaster();
clusterManagerService.offClusterManager();
assertThat(clusterManagerService.getCheckpointIndexRetentionCron(), is(nullValue()));
assertThat(clusterManagerService.getHourlyCron(), is(nullValue()));
}
Expand All @@ -100,10 +100,10 @@ public void testBeforeStop() {
return null;
}).when(clusterService).addLifecycleListener(any());

clusterManagerService.onMaster();
clusterManagerService.onClusterManager();
assertThat(clusterManagerService.getCheckpointIndexRetentionCron(), is(nullValue()));
assertThat(clusterManagerService.getHourlyCron(), is(nullValue()));
clusterManagerService.offMaster();
clusterManagerService.offClusterManager();
assertThat(clusterManagerService.getCheckpointIndexRetentionCron(), is(nullValue()));
assertThat(clusterManagerService.getHourlyCron(), is(nullValue()));
}
Expand Down

0 comments on commit 0e7079e

Please sign in to comment.