adoroszlai commented on code in PR #4865:
URL: https://github.com/apache/ozone/pull/4865#discussion_r1226631307


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/volume/VolumeListKeysHandler.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.hadoop.ozone.shell.volume;
+
+import org.apache.hadoop.ozone.client.OzoneBucket;
+import org.apache.hadoop.ozone.client.OzoneClient;
+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 picocli.CommandLine;
+import picocli.CommandLine.Command;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ * Executes Volume listKeys call.
+ */
+@Command(name = "listkeys",
+    description = "List keys inside volume")
+public class VolumeListKeysHandler extends VolumeHandler {
+
+  @CommandLine.Mixin
+  private ListOptions listOptions;

Review Comment:
   I think we should apply start and prefix to keys, i.e. in this call:
   
   
https://github.com/apache/ozone/blob/b8917885bc4a653834f146d20d918d84d0eefe00/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/ListKeyHandler.java#L117



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/OzoneAddress.java:
##########
@@ -370,12 +378,6 @@ public void ensureSnapshotAddress()
                 "a bucket name. Only a snapshot name with " +
                 "a snapshot indicator is accepted");
       }
-    } else if (volumeName.length() == 0) {
-      throw new OzoneClientException(
-          "Volume name is missing.");
-    } else if (bucketName.length() == 0) {
-      throw new OzoneClientException(
-          "Bucket name is missing.");

Review Comment:
   Please don't remove these.  We should accept "volume or bucket" address only 
for list keys, not for other commands.



-- 
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]

Reply via email to