One2ManyListMap<String, String> newShardsByNode = new One2ManyListMap<String, String>();
for (String node : nodes) {
List<String> nodeShards = newNode2ShardMap.get(node);
List<String> listOfAdded = CollectionUtil.getListOfAdded(currentGlobalNode2ShardsMap.get(node), nodeShards);
if (!listOfAdded.isEmpty()) {
ShardDeployOperation deployInstruction = new ShardDeployOperation();
for (String shard : listOfAdded) {
deployInstruction.addShard(shard, indexMD.getShardPath(shard));
newShardsByNode.add(node, shard);
}
OperationId operationId = protocol.addNodeOperation(node, deployInstruction);
operationIds.add(operationId);
}