Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -541,6 +542,12 @@ public Builder setLeaderId(UUID leaderId1) {
public Builder setNodes(List<DatanodeDetails> nodes) {
this.nodeStatus = new LinkedHashMap<>();
nodes.forEach(node -> nodeStatus.put(node, -1L));
if (nodesInOrder != null) {
// nodesInOrder may belong to another pipeline, avoid overwriting it
nodesInOrder = new LinkedList<>(nodesInOrder);
// drop nodes no longer part of the pipeline
nodesInOrder.retainAll(nodes);
}
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,12 @@ private List<ContainerProtos.ChunkInfo> getChunkInfos(OmKeyLocationInfo
nodes.add(dn);
}
}
List<DatanodeDetails> nodesInOrder =
new ArrayList<>(pipeline.getNodesInOrder());
nodesInOrder.retainAll(nodes);

pipeline = Pipeline.newBuilder(pipeline)
.setReplicationConfig(StandaloneReplicationConfig
.getInstance(HddsProtos.ReplicationFactor.THREE))
.setNodes(nodes)
.build();
pipeline.setNodesInOrder(nodesInOrder);

List<ContainerProtos.ChunkInfo> chunks;
XceiverClientSpi xceiverClientSpi = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Resource ../lib/os.robot

*** Keywords ***
Execute read-replicas CLI tool
Execute ozone debug read-replicas o3://om/${VOLUME}/${BUCKET}/${TESTFILE}
Execute ozone debug -Dozone.network.topology.aware.read=true read-replicas o3://om/${VOLUME}/${BUCKET}/${TESTFILE}
${directory} = Execute ls -d /opt/hadoop/${VOLUME}_${BUCKET}_${TESTFILE}_*/ | tail -n 1
Directory Should Exist ${directory}
File Should Exist ${directory}/${TESTFILE}_manifest
Expand Down