From 07dac024dc61e56bdfffe5101804d0329bfe600d Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Thu, 12 Jun 2025 15:40:32 +0530 Subject: [PATCH 1/3] HDDS-13248. Make --output-dir optional for replicas verify --- .../dist/src/main/smoketest/debug/ozone-debug-tests.robot | 2 +- .../org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java | 2 +- .../apache/hadoop/ozone/debug/replicas/ReplicasVerify.java | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug-tests.robot b/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug-tests.robot index f402e29d78af..9364c98a6ce0 100644 --- a/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug-tests.robot +++ b/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug-tests.robot @@ -37,7 +37,7 @@ Write keys *** Test Cases *** Test ozone debug replicas verify checksums - ${output} = Execute ozone debug replicas verify --checksums --block-existence --container-state o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET}/${TESTFILE} --output-dir ${TEMP_DIR} + ${output} = Execute ozone debug replicas verify --checksums --block-existence --container-state o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET}/${TESTFILE} ${json} = Evaluate json.loads('''${output}''') json # 'keys' array should be empty if all keys and their replicas passed checksum verification diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java index a9662abdead8..14753394cfe3 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneDebugShell.java @@ -104,7 +104,7 @@ public void testReplicasVerifyCmd(boolean isEcKey) throws Exception { getSetConfStringFromConf(OMConfigKeys.OZONE_OM_ADDRESS_KEY), getSetConfStringFromConf(ScmConfigKeys.OZONE_SCM_CLIENT_ADDRESS_KEY), "replicas", "verify", "--checksums", "--block-existence", "--container-state", fullKeyPath, - "--output-dir", "/"//, "--all-results" + //, "--all-results" }; int exitCode = ozoneDebugShell.execute(args); diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java index 00ba8501f657..b947b1d048cb 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java @@ -56,8 +56,9 @@ public class ReplicasVerify extends Handler { private String uri; @CommandLine.Option(names = {"-o", "--output-dir"}, - description = "Destination directory to save the generated output.", - required = true) + description = "Destination directory to save the generated output. " + + "If not specified, the output is printed to the console. " + + "Note: This option is currently not supported") // TODO: HDDS-13063 private String outputDir; @CommandLine.Option(names = {"--all-results"}, From d9d0e32de62ecd64780b3b1e2ba5e3d580b164ad Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Fri, 13 Jun 2025 13:09:24 +0530 Subject: [PATCH 2/3] remove output-dir option --- .../apache/hadoop/ozone/debug/replicas/ReplicasVerify.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java index b947b1d048cb..e4222ae39364 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/ReplicasVerify.java @@ -55,12 +55,6 @@ public class ReplicasVerify extends Handler { description = Shell.OZONE_URI_DESCRIPTION) private String uri; - @CommandLine.Option(names = {"-o", "--output-dir"}, - description = "Destination directory to save the generated output. " + - "If not specified, the output is printed to the console. " + - "Note: This option is currently not supported") // TODO: HDDS-13063 - private String outputDir; - @CommandLine.Option(names = {"--all-results"}, description = "Print results for all passing and failing keys") private boolean allResults; From 80b31b8ae7edced9de59b4e523b65f0a09ef37d1 Mon Sep 17 00:00:00 2001 From: tejaskriya Date: Fri, 13 Jun 2025 13:39:22 +0530 Subject: [PATCH 3/3] remove from ozone-debug.robot --- hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug.robot b/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug.robot index c8eb08924756..c3cb8d2cf15f 100644 --- a/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug.robot +++ b/hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug.robot @@ -23,7 +23,7 @@ ${OM_SERVICE_ID} %{OM_SERVICE_ID} *** Keywords *** Execute replicas verify checksums CLI tool - Execute ozone debug -Dozone.network.topology.aware.read=true replicas verify --checksums --output-dir ${TEMP_DIR} o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET}/${TESTFILE} + Execute ozone debug -Dozone.network.topology.aware.read=true replicas verify --checksums o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET}/${TESTFILE} ${directory} = Execute ls -d ${TEMP_DIR}/${VOLUME}_${BUCKET}_${TESTFILE}_*/ | tail -n 1 Directory Should Exist ${directory} File Should Exist ${directory}/${TESTFILE}_manifest