summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java32
1 files changed, 0 insertions, 32 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java
index 4bc1afc80e..c5d7d68b55 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/es/ElasticSearchClient.java
@@ -33,14 +33,10 @@ import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.apache.commons.lang.SystemUtils;
-import org.elasticsearch.action.admin.cluster.health.ClusterHealthAction;
-import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder;
-import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
-import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
import org.elasticsearch.shield.ShieldPlugin;
@@ -174,34 +170,6 @@ public class ElasticSearchClient {
return serverPort;
}
- /**
- * Wait for green status for the given indices.
- *
- * @param indices
- * The indices to wait for.
- * @return A {@link ClusterHealthResponse} that contains the cluster health
- * after waiting maximum 5 minutes for green status.
- */
- public ClusterHealthResponse waitForGreenStatus(String... indices) {
- ClusterHealthAction healthAction = ClusterHealthAction.INSTANCE;
-
- ClusterHealthRequestBuilder builder = healthAction.newRequestBuilder(this.client.admin().cluster());
- builder.setIndices(indices);
- builder.setWaitForGreenStatus();
- builder.setTimeout(TimeValue.timeValueSeconds(30));
- ClusterHealthResponse response = builder.execute().actionGet();
- log.debug("getStatus : {}", response.getStatus());
- log.debug("getActivePrimaryShards : {}", response.getActivePrimaryShards());
- log.debug("getActiveShards : {}", response.getActiveShards());
- log.debug("getInitializingShards : {}", response.getInitializingShards());
- log.debug("getNumberOfDataNodes : {}", response.getNumberOfDataNodes());
- log.debug("getNumberOfNodes : {}", response.getNumberOfNodes());
- log.debug("getRelocatingShards : {}", response.getRelocatingShards());
- log.debug("getUnassignedShards : {}", response.getUnassignedShards());
- log.debug("getAllValidationFailures : {}", response.getAllValidationFailures());
- return response;
- }
-
@Value("#{elasticsearchConfig['cluster.name']}")
public void setClusterName(final String clusterName) {
this.clusterName = clusterName;