private boolean dropShardRequest()
{
URI shardUri = uriAppendPaths(node.getHttpUri(), "/v1/shard/" + shardId);
Request request = Builder.prepareDelete().setUri(shardUri).build();
StatusResponse response;
try {
response = httpClient.execute(request, createStatusResponseHandler());
}
catch (RuntimeException e) {
log.warn("drop request failed: %s. Cause: %s", shardId, e.getMessage());
return false;
}
if (response.getStatusCode() != HttpStatus.ACCEPTED.code()) {
log.warn("unexpected response status: %s: %s", shardId, response.getStatusCode());
return false;
}
log.debug("initiated drop shard: %s", shardId);
return true;