From abf8ba45cbdb16ac56863c24d2f570e209b2349f Mon Sep 17 00:00:00 2001 From: Martin Traverso Date: Wed, 25 Sep 2019 15:35:59 -0700 Subject: [PATCH] Inline method --- .../io/prestosql/elasticsearch/ElasticsearchClient.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/ElasticsearchClient.java b/presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/ElasticsearchClient.java index 77381930b026..1b6cd16fcdca 100644 --- a/presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/ElasticsearchClient.java +++ b/presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/ElasticsearchClient.java @@ -180,12 +180,6 @@ public ElasticsearchTableDescription getTable(String schemaName, String tableNam } public ClusterSearchShardsResponse getSearchShards(String index) - { - verifyNotNull(client, "client is null"); - return getSearchShardsResponse(client, new ClusterSearchShardsRequest(index)); - } - - private ClusterSearchShardsResponse getSearchShardsResponse(TransportClient client, ClusterSearchShardsRequest request) { try { return retry() @@ -193,7 +187,7 @@ private ClusterSearchShardsResponse getSearchShardsResponse(TransportClient clie .exponentialBackoff(maxRetryTime) .run("getSearchShardsResponse", () -> client.admin() .cluster() - .searchShards(request) + .searchShards(new ClusterSearchShardsRequest(index)) .actionGet(requestTimeout.toMillis())); } catch (Exception e) {