adoroszlai commented on code in PR #4706:
URL: https://github.com/apache/ozone/pull/4706#discussion_r1193492130


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/ChunkKeyHandler.java:
##########
@@ -115,11 +116,17 @@ protected void execute(OzoneClient client, OzoneAddress 
address)
         ContainerChunkInfo containerChunkInfo = new ContainerChunkInfo();
         long containerId = keyLocation.getContainerID();
         chunkPaths.clear();
-        Pipeline pipeline = keyLocation.getPipeline();
-        if (pipeline.getType() != HddsProtos.ReplicationType.STAND_ALONE) {
-          pipeline = Pipeline.newBuilder(pipeline)
+        Pipeline keyPipeline = keyLocation.getPipeline();
+        boolean isECKey =
+            keyPipeline.getReplicationConfig().getReplicationType() ==
+                HddsProtos.ReplicationType.EC;
+        Pipeline pipeline;
+        if (keyPipeline.getType() != HddsProtos.ReplicationType.STAND_ALONE) {
+          pipeline = Pipeline.newBuilder(keyPipeline)
               .setReplicationConfig(StandaloneReplicationConfig
                   .getInstance(ONE)).build();
+        } else {
+          pipeline = keyPipeline;

Review Comment:
   Previous logic:
   
   ```
   pipeline = keyPipeline
   if (not standalone) {
     pipeline = ...
   }
   ```
   
   New logic:
   
   ```
   if (not standalone) {
     pipeline = ...
   } else {
     pipeline = keyPipeline
   }
   ```
   
   I think the result is the same in both cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to