aryangupta1998 commented on code in PR #8515:
URL: https://github.com/apache/ozone/pull/8515#discussion_r2111309497
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/chunk/ChunkKeyHandler.java:
##########
@@ -190,9 +190,12 @@ protected void execute(OzoneClient client, OzoneAddress
address)
}
if (isECKey) {
- ChunkType blockChunksType = isECParityBlock(keyPipeline,
entry.getKey()) ?
- ChunkType.PARITY : ChunkType.DATA;
- jsonObj.put("chunkType", blockChunksType.name());
+ int replicaIndex = keyPipeline.getReplicaIndex(entry.getKey());
+ int dataCount = ((ECReplicationConfig)
keyPipeline.getReplicationConfig()).getData();
+
+ ChunkType chunkType = (replicaIndex > dataCount) ?
ChunkType.PARITY : ChunkType.DATA;
Review Comment:
Let's keep the earlier comment.
```suggestion
// Index is 1-based,
// e.g. for RS-3-2 we will have data indexes 1,2,3 and parity
indexes 4,5
ChunkType chunkType = (replicaIndex > dataCount) ?
ChunkType.PARITY : ChunkType.DATA;
```
--
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]