Skip to content

Commit

Permalink
Deprecate Index Status API
Browse files Browse the repository at this point in the history
Elasticsearch 1.1 introduced the recovery API, which replaces the
functionality of the index status API.
This marks the index status API as deprecated in order to remove it in the future.

Relates #4854
  • Loading branch information
spinscale committed May 7, 2014
1 parent 4c45e3c commit f0d73a8
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 15 deletions.
Expand Up @@ -20,8 +20,10 @@
package org.elasticsearch.action.admin.indices.status;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class DocsStatus {

long numDocs = 0;
Expand Down
Expand Up @@ -24,8 +24,10 @@
import org.elasticsearch.common.unit.TimeValue;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class GatewayRecoveryStatus {

public enum Stage {
Expand Down
Expand Up @@ -24,8 +24,10 @@
import org.elasticsearch.common.unit.TimeValue;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class GatewaySnapshotStatus {

public static enum Stage {
Expand Down
Expand Up @@ -29,8 +29,10 @@
import java.util.Iterator;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class IndexShardStatus implements Iterable<ShardStatus> {

private final ShardId shardId;
Expand Down
Expand Up @@ -32,8 +32,10 @@
import static com.google.common.collect.Lists.newArrayList;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class IndexStatus implements Iterable<IndexShardStatus> {

private final String index;
Expand Down
Expand Up @@ -23,7 +23,10 @@
import org.elasticsearch.client.IndicesAdminClient;

/**
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class IndicesStatusAction extends IndicesAction<IndicesStatusRequest, IndicesStatusResponse, IndicesStatusRequestBuilder> {

public static final IndicesStatusAction INSTANCE = new IndicesStatusAction();
Expand Down
Expand Up @@ -27,8 +27,10 @@
import java.io.IOException;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class IndicesStatusRequest extends BroadcastOperationRequest<IndicesStatusRequest> {

private boolean recovery = false;
Expand Down
Expand Up @@ -25,8 +25,10 @@
import org.elasticsearch.client.internal.InternalIndicesAdminClient;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class IndicesStatusRequestBuilder extends BroadcastOperationRequestBuilder<IndicesStatusRequest, IndicesStatusResponse, IndicesStatusRequestBuilder> {

public IndicesStatusRequestBuilder(IndicesAdminClient indicesClient) {
Expand Down
Expand Up @@ -44,8 +44,10 @@
import static org.elasticsearch.action.admin.indices.status.ShardStatus.readIndexShardStatus;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class IndicesStatusResponse extends BroadcastOperationResponse implements ToXContent {

protected ShardStatus[] shards;
Expand Down
Expand Up @@ -24,8 +24,10 @@
import org.elasticsearch.common.unit.TimeValue;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class PeerRecoveryStatus {

public enum Stage {
Expand Down
Expand Up @@ -35,8 +35,10 @@
import static org.elasticsearch.common.unit.ByteSizeValue.readBytesSizeValue;

/**
* Shard instance (actual allocated shard) status.
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class ShardStatus extends BroadcastShardOperationResponse {

private ShardRouting shardRouting;
Expand Down
Expand Up @@ -54,8 +54,10 @@
import static com.google.common.collect.Lists.newArrayList;

/**
*
* This class will be removed in future versions
* Use the recovery API instead
*/
@Deprecated
public class TransportIndicesStatusAction extends TransportBroadcastOperationAction<IndicesStatusRequest, IndicesStatusResponse, TransportIndicesStatusAction.IndexShardStatusRequest, ShardStatus> {

private final IndicesService indicesService;
Expand Down
Expand Up @@ -200,26 +200,29 @@ public interface IndicesAdminClient {
RecoveryRequestBuilder prepareRecoveries(String... indices);

/**
* The status of one or more indices.
* The status of one or more indices. Use the recovery API instead
*
* @param request The indices status request
* @return The result future
* @see Requests#indicesStatusRequest(String...)
*/
@Deprecated
ActionFuture<IndicesStatusResponse> status(IndicesStatusRequest request);

/**
* The status of one or more indices.
* The status of one or more indices. Use the recovery API instead.
*
* @param request The indices status request
* @param listener A listener to be notified with a result
* @see Requests#indicesStatusRequest(String...)
*/
@Deprecated
void status(IndicesStatusRequest request, ActionListener<IndicesStatusResponse> listener);

/**
* The status of one or more indices.
* The status of one or more indices. Use the recovery API instead
*/
@Deprecated
IndicesStatusRequestBuilder prepareStatus(String... indices);

/**
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/elasticsearch/client/Requests.java
Expand Up @@ -185,12 +185,13 @@ public static SearchScrollRequest searchScrollRequest(String scrollId) {
}

/**
* Creates an indices status request.
* Creates an indices status request. Use the Recovery API instead
*
* @param indices The indices to query status about. Use <tt>null</tt> or <tt>_all</tt> to execute against all indices
* @return The indices status request
* @see org.elasticsearch.client.IndicesAdminClient#status(org.elasticsearch.action.admin.indices.status.IndicesStatusRequest)
*/
@Deprecated
public static IndicesStatusRequest indicesStatusRequest(String... indices) {
return new IndicesStatusRequest(indices);
}
Expand Down

0 comments on commit f0d73a8

Please sign in to comment.