@Override protected GroupShardsIterator shards(IndexReplicationPingRequest indexRequest) {
IndexRoutingTable indexRouting = clusterService.state().routingTable().index(indexRequest.index());
if (indexRouting == null) {
throw new IndexMissingException(new Index(indexRequest.index()));
}
return indexRouting.groupByShardsIt();
}
@Override protected ShardReplicationPingRequest newShardRequestInstance(IndexReplicationPingRequest indexRequest, int shardId) {
return new ShardReplicationPingRequest(indexRequest, shardId);
}