diff --git a/src/main/java/org/opensearch/ad/indices/AnomalyDetectionIndices.java b/src/main/java/org/opensearch/ad/indices/AnomalyDetectionIndices.java index 6277d5f0c..d20672ff6 100644 --- a/src/main/java/org/opensearch/ad/indices/AnomalyDetectionIndices.java +++ b/src/main/java/org/opensearch/ad/indices/AnomalyDetectionIndices.java @@ -71,7 +71,6 @@ import org.opensearch.client.AdminClient; import org.opensearch.client.Client; import org.opensearch.cluster.LocalNodeClusterManagerListener; -import org.opensearch.cluster.LocalNodeClusterManagerListener; import org.opensearch.cluster.metadata.AliasMetadata; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.service.ClusterService; diff --git a/src/test/java/org/opensearch/ad/cluster/ADClusterEventListenerTests.java b/src/test/java/org/opensearch/ad/cluster/ADClusterEventListenerTests.java index ac4550594..268133bfc 100644 --- a/src/test/java/org/opensearch/ad/cluster/ADClusterEventListenerTests.java +++ b/src/test/java/org/opensearch/ad/cluster/ADClusterEventListenerTests.java @@ -81,7 +81,10 @@ public void setUp() throws Exception { oldClusterState = ClusterState .builder(new ClusterName(clusterName)) .nodes( - new DiscoveryNodes.Builder().clusterManagerNodeId(clusterManagerNodeId).localNodeId(clusterManagerNodeId).add(clusterManagerNode) + new DiscoveryNodes.Builder() + .clusterManagerNodeId(clusterManagerNodeId) + .localNodeId(clusterManagerNodeId) + .add(clusterManagerNode) ) .build(); newClusterState = ClusterState