ArafatKhan2198 commented on code in PR #7229:
URL: https://github.com/apache/ozone/pull/7229#discussion_r1772898180
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/container/ListSubcommand.java:
##########
@@ -37,8 +37,18 @@ public class ListSubcommand implements Callable<Void> {
@CommandLine.ParentCommand
private ContainerCommands parent;
+ @CommandLine.Option(names = {"--path", "-p"},
Review Comment:
The command works, but we need to specify the path before the `list`
subcommand, if we add the --path option in the ContainerCommands class.
```
sh-4.2$ ozone debug container list --path=/data/hdds
Unknown option: '--path=/data/hdds'
Usage: ozone debug container list
Show container info of all container replicas on datanode
```
However, this works:
```
sh-4.2$ ozone debug container --path=/data/hdds list
{
"containerType" : "KeyValueContainer",
"containerID" : 1,
"metadata" : { },
"chunksPath" :
"/data/hdds/hdds/CID-9a218a31-0faa-4588-95e1-fed536eb0f5c/current/containerDir0/1/chunks",
"state" : "OPEN",
}
```
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/container/ListSubcommand.java:
##########
@@ -37,8 +37,18 @@ public class ListSubcommand implements Callable<Void> {
@CommandLine.ParentCommand
private ContainerCommands parent;
+ @CommandLine.Option(names = {"--path", "-p"},
Review Comment:
The command works, but we need to specify the path before the `list`
subcommand, if we add the --path option in the ContainerCommands class.
```
sh-4.2$ ozone debug container list --path=/data/hdds
Unknown option: '--path=/data/hdds'
Usage: ozone debug container list
Show container info of all container replicas on datanode
```
However, this works:
```
sh-4.2$ ozone debug container --path=/data/hdds list
{
"containerType" : "KeyValueContainer",
"containerID" : 1,
"metadata" : { },
"chunksPath" :
"/data/hdds/hdds/CID-9a218a31-0faa-4588-95e1-fed536eb0f5c/current/containerDir0/1/chunks",
"state" : "OPEN",
}
```
@sadanand48 @ashishkumar50
--
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]