xBis7 commented on code in PR #4125: URL: https://github.com/apache/ozone/pull/4125#discussion_r1095172484
########## hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotHandler.java: ########## @@ -0,0 +1,36 @@ +/** + * 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 + * <p> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p> + * 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.snapshot; + +import org.apache.hadoop.ozone.shell.Handler; +import org.apache.hadoop.ozone.shell.OzoneAddress; +import picocli.CommandLine; + +/** + * Base class for snapshot command handlers. + */ +public abstract class SnapshotHandler extends Handler { Review Comment: Extending `BucketHandler` won't work because we will end up calling `ensureBucketAddress()` instead of `ensureSnapshotAddress()`. ``` bash-4.2$ ozone sh key list /vol1/bucket1/.snapshot/snap1 Invalid value for positional parameter at index 0 (<value>): cannot convert '/vol1/bucket1/.snapshot/snap1' to OzoneAddress (org.apache.hadoop.ozone.client.OzoneClientException: Invalid bucket name. Delimiters (/) not allowed in bucket name) ``` -- 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]
