org.elasticsearch.action.admin.indices.recovery.RecoveryResponse Java Examples
The following examples show how to use
org.elasticsearch.action.admin.indices.recovery.RecoveryResponse.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RestRecoveryAction.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) { final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index"))); recoveryRequest.detailed(request.paramAsBoolean("detailed", false)); recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false)); recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions())); client.admin().indices().recoveries(recoveryRequest, new RestBuilderListener<RecoveryResponse>(channel) { @Override public RestResponse buildResponse(RecoveryResponse response, XContentBuilder builder) throws Exception { response.detailed(recoveryRequest.detailed()); builder.startObject(); response.toXContent(builder, request); builder.endObject(); return new BytesRestResponse(OK, builder); } }); }
Example #2
Source File: RestRecoveryAction.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void doRequest(final RestRequest request, final RestChannel channel, final Client client) { final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index"))); recoveryRequest.detailed(request.paramAsBoolean("detailed", false)); recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false)); recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions())); client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) { @Override public RestResponse buildResponse(final RecoveryResponse response) throws Exception { return RestTable.buildResponse(buildRecoveryTable(request, response), channel); } }); }
Example #3
Source File: DcIndicesStatusResponseImpl.java From io with Apache License 2.0 | 5 votes |
/** * . * @param response . * @return . */ public static DcIndicesStatusResponse getInstance(RecoveryResponse response) { if (response == null) { return null; } return new DcIndicesStatusResponseImpl(response); }
Example #4
Source File: BaseClient.java From elasticsearch-helper with Apache License 2.0 | 5 votes |
public int waitForRecovery(String index) throws IOException { if (client() == null) { return -1; } if (index == null) { throw new IOException("unable to waitfor recovery, index not set"); } RecoveryResponse response = client().execute(RecoveryAction.INSTANCE, new RecoveryRequest(index)).actionGet(); int shards = response.getTotalShards(); client().execute(ClusterHealthAction.INSTANCE, new ClusterHealthRequest(index).waitForActiveShards(shards)).actionGet(); return shards; }
Example #5
Source File: AbstractClient.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public ActionFuture<RecoveryResponse> recoveries(final RecoveryRequest request) { return execute(RecoveryAction.INSTANCE, request); }
Example #6
Source File: AbstractClient.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void recoveries(final RecoveryRequest request, final ActionListener<RecoveryResponse> listener) { execute(RecoveryAction.INSTANCE, request, listener); }
Example #7
Source File: InternalEsClient.java From io with Apache License 2.0 | 4 votes |
/** * インデックスステータスを取得する. * @return 非同期応答 */ public ActionFuture<RecoveryResponse> indicesStatus() { RecoveryRequestBuilder cirb = new RecoveryRequestBuilder(esTransportClient.admin().indices(), RecoveryAction.INSTANCE); return cirb.execute(); }
Example #8
Source File: AbstractClient.java From crate with Apache License 2.0 | 4 votes |
@Override public ActionFuture<RecoveryResponse> recoveries(final RecoveryRequest request) { return execute(RecoveryAction.INSTANCE, request); }
Example #9
Source File: AbstractClient.java From crate with Apache License 2.0 | 4 votes |
@Override public void recoveries(final RecoveryRequest request, final ActionListener<RecoveryResponse> listener) { execute(RecoveryAction.INSTANCE, request, listener); }
Example #10
Source File: IndicesAdminClient.java From Elasticsearch with Apache License 2.0 | 2 votes |
/** * Indices recoveries */ ActionFuture<RecoveryResponse> recoveries(RecoveryRequest request);
Example #11
Source File: IndicesAdminClient.java From Elasticsearch with Apache License 2.0 | 2 votes |
/** *Indices recoveries */ void recoveries(RecoveryRequest request, ActionListener<RecoveryResponse> listener);
Example #12
Source File: DcIndicesStatusResponseImpl.java From io with Apache License 2.0 | 2 votes |
/** * GetResponseを指定してインスタンスを生成する. * @param response ESからのレスポンスオブジェクト */ private DcIndicesStatusResponseImpl(RecoveryResponse response) { this.indicesStatusResponse = response; }
Example #13
Source File: IndicesAdminClient.java From crate with Apache License 2.0 | 2 votes |
/** * Indices recoveries */ ActionFuture<RecoveryResponse> recoveries(RecoveryRequest request);
Example #14
Source File: IndicesAdminClient.java From crate with Apache License 2.0 | 2 votes |
/** *Indices recoveries */ void recoveries(RecoveryRequest request, ActionListener<RecoveryResponse> listener);