errose28 commented on code in PR #7748: URL: https://github.com/apache/ozone/pull/7748#discussion_r1963875379
########## hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/replicas/Checksums.java: ########## @@ -33,34 +33,35 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; -import org.apache.hadoop.hdds.cli.DebugSubcommand; +import java.util.function.BiConsumer; import org.apache.hadoop.hdds.client.BlockID; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.hdds.server.JsonUtils; import org.apache.hadoop.hdds.utils.IOUtils; import org.apache.hadoop.ozone.client.OzoneClient; +import org.apache.hadoop.ozone.client.OzoneClientException; import org.apache.hadoop.ozone.client.OzoneKeyDetails; import org.apache.hadoop.ozone.client.io.OzoneInputStream; import org.apache.hadoop.ozone.client.protocol.ClientProtocol; import org.apache.hadoop.ozone.client.rpc.RpcClient; import org.apache.hadoop.ozone.common.OzoneChecksumException; import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo; +import org.apache.hadoop.ozone.shell.Handler; import org.apache.hadoop.ozone.shell.OzoneAddress; -import org.apache.hadoop.ozone.shell.keys.KeyHandler; -import org.kohsuke.MetaInfServices; +import org.apache.hadoop.ozone.shell.Shell; import picocli.CommandLine; /** * Class that downloads every replica for all the blocks associated with a * given key. It also generates a manifest file with information about the * downloaded replicas. */ [email protected](name = "read-replicas", [email protected](name = "checksums", description = "Reads every replica for all the blocks associated with a " + - "given key.") -@MetaInfServices(DebugSubcommand.class) -public class ReadReplicas extends KeyHandler implements DebugSubcommand { + "given key.", + aliases = {"--checksums"}) Review Comment: `--checksums` will still be interpreted as a command, not a flag, in this scenario meaning it won't work at the same time as other check flags added later. Similarly the `--output-dir` and `URI` flags are coupled to this subcommand instead of the `verify` subcommand. The `ReplicasVerify` class needs to define all the flags and arguments under it's `verify` subcommand. Then we can call into different drivers to do the work. -- 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]
