Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 59d26f6

Browse files
authored
Merge pull request #79 from dvjyothsna/od-1.3
Update Performance Analyzer to support ElasticSearch version 7.3.2
2 parents 70f51ea + a9bd630 commit 59d26f6

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
buildscript {
1717

1818
ext {
19-
es_version = System.getProperty("es.version", "7.2.1")
19+
es_version = System.getProperty("es.version", "7.3.2")
2020
}
2121
// This isn't applying from repositories.gradle so repeating it here
2222
repositories {
@@ -34,7 +34,7 @@ plugins {
3434
}
3535

3636
ext {
37-
opendistroVersion = '1.2.1'
37+
opendistroVersion = '1.3.0'
3838
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
3939
}
4040

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@
1515

1616
package com.amazon.opendistro.elasticsearch.performanceanalyzer.http_action.whoami;
1717

18-
import org.elasticsearch.action.Action;
18+
import org.elasticsearch.action.ActionType;
19+
import org.elasticsearch.common.io.stream.Writeable;
1920

20-
public class WhoAmIAction extends Action<WhoAmIResponse> {
21+
public class WhoAmIAction extends ActionType<WhoAmIResponse> {
2122

2223
public static final WhoAmIAction INSTANCE = new WhoAmIAction();
2324
public static final String NAME = "cluster:admin/performanceanalyzer/whoami";
25+
public static final Writeable.Reader<WhoAmIResponse> responseReader = null;
2426

25-
protected WhoAmIAction() {
26-
super(NAME);
27+
private WhoAmIAction() {
28+
super(NAME, responseReader);
2729
}
2830

2931
@Override
30-
public WhoAmIResponse newResponse() {
31-
return new WhoAmIResponse();
32+
public Writeable.Reader<WhoAmIResponse> getResponseReader() {
33+
return responseReader;
3234
}
3335
}
36+

src/test/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/hwnet/CollectMetricsTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import org.elasticsearch.Version;
3939
import org.elasticsearch.cluster.ClusterState;
4040
import org.elasticsearch.cluster.node.DiscoveryNode;
41-
import org.elasticsearch.cluster.node.DiscoveryNode.Role;
41+
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
4242
import org.elasticsearch.cluster.node.DiscoveryNodes;
4343
import org.elasticsearch.cluster.service.ClusterService;
4444
import org.elasticsearch.common.transport.TransportAddress;
@@ -466,12 +466,12 @@ private static List<DiscoveryNode> buildNumNodes(String nodeId1, String nodeId2,
466466

467467
final DiscoveryNode node1 = new DiscoveryNode("s7gDCVn", nodeId1,
468468
new TransportAddress(address1, 9200), emptyMap(),
469-
singleton(Role.MASTER), Version.CURRENT);
469+
singleton(DiscoveryNodeRole.MASTER_ROLE), Version.CURRENT);
470470
nodesList.add(node1);
471471

472472
final DiscoveryNode node2 = new DiscoveryNode("Zn1QcSU", nodeId2,
473473
new TransportAddress(address2, 9200), emptyMap(),
474-
singleton(Role.DATA), Version.CURRENT);
474+
singleton(DiscoveryNodeRole.DATA_ROLE), Version.CURRENT);
475475
nodesList.add(node2);
476476

477477
return nodesList;

0 commit comments

Comments
 (0)