diff options
author | Luca Cavanna <javanna@users.noreply.github.com> | 2017-04-26 21:45:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 21:45:49 +0200 |
commit | 149629fec657e9948488195087f30583cd561f11 (patch) | |
tree | 015d8a6b9e5c20aa20ccd99b6bd82fe64e3b289c /core/src/test/java/org/elasticsearch/action/support | |
parent | 2ed1f7a3390420835f9b270d20c5d512ba197827 (diff) |
Cross Cluster Search: propagate original indices per cluster (#24328)
In case of a Cross Cluster Search, the coordinating node should split the original indices per cluster, and send over to each cluster only its own set of original indices, rather than the set taken from the original search request which contains all the indices.
In fact, each remote cluster should not be aware of the indices belonging to other remote clusters.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/support')
-rw-r--r-- | core/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java b/core/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java index ef025e3c37..93d8be990d 100644 --- a/core/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java +++ b/core/src/test/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeActionTests.java @@ -296,7 +296,7 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase { ShardsIterator shardIt = clusterService.state().routingTable().allShards(new String[]{TEST_INDEX}); Set<String> set = new HashSet<>(); - for (ShardRouting shard : shardIt.asUnordered()) { + for (ShardRouting shard : shardIt) { set.add(shard.currentNodeId()); } @@ -332,7 +332,7 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase { // the master should not be in the list of nodes that requests were sent to ShardsIterator shardIt = clusterService.state().routingTable().allShards(new String[]{TEST_INDEX}); Set<String> set = new HashSet<>(); - for (ShardRouting shard : shardIt.asUnordered()) { + for (ShardRouting shard : shardIt) { if (!shard.currentNodeId().equals(masterNode.getId())) { set.add(shard.currentNodeId()); } @@ -352,8 +352,8 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase { public void testOperationExecution() throws Exception { ShardsIterator shardIt = clusterService.state().routingTable().allShards(new String[]{TEST_INDEX}); Set<ShardRouting> shards = new HashSet<>(); - String nodeId = shardIt.asUnordered().iterator().next().currentNodeId(); - for (ShardRouting shard : shardIt.asUnordered()) { + String nodeId = shardIt.iterator().next().currentNodeId(); + for (ShardRouting shard : shardIt) { if (nodeId.equals(shard.currentNodeId())) { shards.add(shard); } @@ -417,7 +417,7 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase { ShardsIterator shardIt = clusterService.state().getRoutingTable().allShards(new String[]{TEST_INDEX}); Map<String, List<ShardRouting>> map = new HashMap<>(); - for (ShardRouting shard : shardIt.asUnordered()) { + for (ShardRouting shard : shardIt) { if (!map.containsKey(shard.currentNodeId())) { map.put(shard.currentNodeId(), new ArrayList<>()); } |