adoroszlai commented on code in PR #6401:
URL: https://github.com/apache/ozone/pull/6401#discussion_r1533355343
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/ChunkKeyHandler.java:
##########
@@ -102,8 +100,9 @@ protected void execute(OzoneClient client, OzoneAddress
address)
}
ContainerLayoutVersion containerLayoutVersion = ContainerLayoutVersion
.getConfiguredVersion(getConf());
- JsonArray responseArrayList = new JsonArray();
- for (OmKeyLocationInfo keyLocation : locationInfos) {
+ ArrayNode responseArrayList = JsonUtils.createArrayNode();
+ for (OmKeyLocationInfo keyLocation : keyInfo.getLatestVersionLocations()
+ .getBlocksLatestVersionOnly()) {
Review Comment:
Also seems to be unrelated changed. Can we keep using `locationInfos`?
```suggestion
for (OmKeyLocationInfo keyLocation : locationInfos) {
```
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/ReadReplicas.java:
##########
@@ -213,10 +205,11 @@ private void downloadReplicasAndCreateManifest(
}
replicasJson.add(replicaJson);
}
- blockJson.add(JSON_PROPERTY_BLOCK_REPLICAS, replicasJson);
+ blockJson.set(JSON_PROPERTY_BLOCK_REPLICAS, replicasJson);
blocks.add(blockJson);
- IOUtils.close(LOG, blockReplicasWithoutChecksum.values());
+ blockReplicasWithoutChecksum.values()
+ .forEach(each -> IOUtils.close(LOG, each));
Review Comment:
This part of the change is unrelated, only due to merge conflict resolution.
Let's keep the original:
```suggestion
IOUtils.close(LOG, blockReplicasWithoutChecksum.values());
```
--
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]