Skip to content

Commit

Permalink
Inline method
Browse files Browse the repository at this point in the history
  • Loading branch information
martint committed Oct 2, 2019
1 parent cccdd45 commit abf8ba4
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,14 @@ 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()
.maxAttempts(maxAttempts)
.exponentialBackoff(maxRetryTime)
.run("getSearchShardsResponse", () -> client.admin()
.cluster()
.searchShards(request)
.searchShards(new ClusterSearchShardsRequest(index))
.actionGet(requestTimeout.toMillis()));
}
catch (Exception e) {
Expand Down

0 comments on commit abf8ba4

Please sign in to comment.