org.elasticsearch.cluster.routing.operation.plain
Class PlainOperationRouting
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.cluster.routing.operation.plain.PlainOperationRouting
- All Implemented Interfaces:
- OperationRouting
public class PlainOperationRouting
- extends AbstractComponent
- implements OperationRouting
Method Summary |
GroupShardsIterator |
broadcastDeleteShards(ClusterState clusterState,
String index)
|
GroupShardsIterator |
deleteByQueryShards(ClusterState clusterState,
String index,
Set<String> routing)
|
ShardIterator |
deleteShards(ClusterState clusterState,
String index,
String type,
String id,
String routing)
|
ShardIterator |
getShards(ClusterState clusterState,
String index,
int shardId,
String preference)
|
ShardIterator |
getShards(ClusterState clusterState,
String index,
String type,
String id,
String routing,
String preference)
|
protected int |
hash(String routing)
|
protected int |
hash(String type,
String id)
|
IndexMetaData |
indexMetaData(ClusterState clusterState,
String index)
|
protected IndexRoutingTable |
indexRoutingTable(ClusterState clusterState,
String index)
|
ShardIterator |
indexShards(ClusterState clusterState,
String index,
String type,
String id,
String routing)
|
GroupShardsIterator |
searchShards(ClusterState clusterState,
String[] indices,
String[] concreteIndices,
String queryHint,
Map<String,Set<String>> routing,
String preference)
|
int |
searchShardsCount(ClusterState clusterState,
String[] indices,
String[] concreteIndices,
String queryHint,
Map<String,Set<String>> routing,
String preference)
|
protected IndexShardRoutingTable |
shards(ClusterState clusterState,
String index,
int shardId)
|
protected IndexShardRoutingTable |
shards(ClusterState clusterState,
String index,
String type,
String id,
String routing)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlainOperationRouting
@Inject
public PlainOperationRouting(Settings indexSettings,
HashFunction hashFunction,
AwarenessAllocationDecider awarenessAllocationDecider)
indexShards
public ShardIterator indexShards(ClusterState clusterState,
String index,
String type,
String id,
@Nullable
String routing)
throws IndexMissingException,
IndexShardMissingException
- Specified by:
indexShards
in interface OperationRouting
- Throws:
IndexMissingException
IndexShardMissingException
deleteShards
public ShardIterator deleteShards(ClusterState clusterState,
String index,
String type,
String id,
@Nullable
String routing)
throws IndexMissingException,
IndexShardMissingException
- Specified by:
deleteShards
in interface OperationRouting
- Throws:
IndexMissingException
IndexShardMissingException
getShards
public ShardIterator getShards(ClusterState clusterState,
String index,
String type,
String id,
@Nullable
String routing,
@Nullable
String preference)
throws IndexMissingException,
IndexShardMissingException
- Specified by:
getShards
in interface OperationRouting
- Throws:
IndexMissingException
IndexShardMissingException
getShards
public ShardIterator getShards(ClusterState clusterState,
String index,
int shardId,
@Nullable
String preference)
throws IndexMissingException,
IndexShardMissingException
- Specified by:
getShards
in interface OperationRouting
- Throws:
IndexMissingException
IndexShardMissingException
broadcastDeleteShards
public GroupShardsIterator broadcastDeleteShards(ClusterState clusterState,
String index)
throws IndexMissingException
- Specified by:
broadcastDeleteShards
in interface OperationRouting
- Throws:
IndexMissingException
deleteByQueryShards
public GroupShardsIterator deleteByQueryShards(ClusterState clusterState,
String index,
@Nullable
Set<String> routing)
throws IndexMissingException
- Specified by:
deleteByQueryShards
in interface OperationRouting
- Throws:
IndexMissingException
searchShardsCount
public int searchShardsCount(ClusterState clusterState,
String[] indices,
String[] concreteIndices,
@Nullable
String queryHint,
@Nullable
Map<String,Set<String>> routing,
@Nullable
String preference)
throws IndexMissingException
- Specified by:
searchShardsCount
in interface OperationRouting
- Throws:
IndexMissingException
searchShards
public GroupShardsIterator searchShards(ClusterState clusterState,
String[] indices,
String[] concreteIndices,
@Nullable
String queryHint,
@Nullable
Map<String,Set<String>> routing,
@Nullable
String preference)
throws IndexMissingException
- Specified by:
searchShards
in interface OperationRouting
- Throws:
IndexMissingException
indexMetaData
public IndexMetaData indexMetaData(ClusterState clusterState,
String index)
indexRoutingTable
protected IndexRoutingTable indexRoutingTable(ClusterState clusterState,
String index)
shards
protected IndexShardRoutingTable shards(ClusterState clusterState,
String index,
String type,
String id,
String routing)
shards
protected IndexShardRoutingTable shards(ClusterState clusterState,
String index,
int shardId)
hash
protected int hash(String routing)
hash
protected int hash(String type,
String id)
Copyright © 2009-2012. All Rights Reserved.