dombizita commented on code in PR #8248:
URL: https://github.com/apache/ozone/pull/8248#discussion_r2068573136
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java:
##########
@@ -80,42 +93,120 @@ void findCandidateKeys(OzoneClient ozoneClient,
OzoneAddress address) throws IOE
String volumeName = address.getVolumeName();
String bucketName = address.getBucketName();
String keyName = address.getKeyName();
+
+ ObjectNode root = JsonUtils.createObjectNode(null);
+ ArrayNode keysArray = root.putArray("keys");
+
+ boolean[] allKeysPassed = {true};
Review Comment:
Why is this an array? I only saw that you used the first element later
(`allKeysPassed[0]`)
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/Checksums.java:
##########
Review Comment:
Is this file still there, but it's empty? Did you mean to delete it?
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java:
##########
@@ -87,6 +87,28 @@ void shutdown() {
IOUtils.closeQuietly(client);
}
+ @ParameterizedTest
+ @ValueSource(booleans = {true, false})
+ public void testReplicasVerifyCmd(boolean isEcKey) throws Exception {
+ final String volumeName = UUID.randomUUID().toString();
+ final String bucketName = UUID.randomUUID().toString();
+ final String keyName = UUID.randomUUID().toString();
+
+ writeKey(volumeName, bucketName, keyName, isEcKey);
+
+ String bucketPath = Path.SEPARATOR + volumeName + Path.SEPARATOR +
bucketName;
+ String fullKeyPath = bucketPath + Path.SEPARATOR + keyName;
+
+ String[] args = new String[] {
+ getSetConfStringFromConf(OMConfigKeys.OZONE_OM_ADDRESS_KEY),
+ "replicas", "verify", "--checksums", "--block-existence", fullKeyPath,
"--output-dir", "/"//, "--all-results"
Review Comment:
Do you think we should add a comment here as well (because of the commented
out `--all-results`)?
```
#TODO HDDS-12890: Add acceptance robot tests for ozone debug replicas verify
```
--
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]