xBis7 commented on code in PR #4125:
URL: https://github.com/apache/ozone/pull/4125#discussion_r1085483506
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/ListKeyHandler.java:
##########
@@ -21,25 +21,26 @@
import java.io.IOException;
import java.util.Iterator;
+import com.google.common.base.Strings;
import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneClientException;
import org.apache.hadoop.ozone.client.OzoneKey;
import org.apache.hadoop.ozone.client.OzoneVolume;
import org.apache.hadoop.ozone.shell.ListOptions;
import org.apache.hadoop.ozone.shell.OzoneAddress;
-import org.apache.hadoop.ozone.shell.bucket.BucketHandler;
+import org.apache.hadoop.ozone.shell.snapshot.SnapshotHandler;
import picocli.CommandLine;
import picocli.CommandLine.Command;
/**
- * Executes List Keys.
+ * Executes List Keys for a bucket or snapshot.
*/
@Command(name = "list",
aliases = "ls",
- description = "list all keys in a given bucket")
-public class ListKeyHandler extends BucketHandler {
+ description = "list all keys in a given bucket or snapshot")
+public class ListKeyHandler extends SnapshotHandler {
Review Comment:
> Also structurally SnapshotHandler gives the wrong impression.
You are right, but despite the class name, it's related to what the path
accepts and not the commands. We need a way to verify an address by calling
`OzoneAddress.ensureSnapshotAddress()`.
--
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]