From ac762d22e92b6401220c69a03ab08870daa937b7 Mon Sep 17 00:00:00 2001 From: George Jahad Date: Thu, 22 Jul 2021 18:55:24 -0700 Subject: [PATCH 1/3] removed delete command --- .../scm/cli/container/ContainerCommands.java | 1 - .../scm/cli/container/DeleteSubcommand.java | 54 ------------------- 2 files changed, 55 deletions(-) delete mode 100644 hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/DeleteSubcommand.java diff --git a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/ContainerCommands.java b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/ContainerCommands.java index de1015d141e7..00d678cff2e1 100644 --- a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/ContainerCommands.java +++ b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/ContainerCommands.java @@ -43,7 +43,6 @@ subcommands = { ListSubcommand.class, InfoSubcommand.class, - DeleteSubcommand.class, CreateSubcommand.class, CloseSubcommand.class }) diff --git a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/DeleteSubcommand.java b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/DeleteSubcommand.java deleted file mode 100644 index 62d1b8ab2ae3..000000000000 --- a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/DeleteSubcommand.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.hdds.scm.cli.container; - -import java.io.IOException; - -import org.apache.hadoop.hdds.cli.HddsVersionProvider; -import org.apache.hadoop.hdds.scm.cli.ScmSubcommand; -import org.apache.hadoop.hdds.scm.client.ScmClient; - -import static org.apache.hadoop.hdds.scm.cli.container.ContainerCommands.checkContainerExists; -import picocli.CommandLine.Command; -import picocli.CommandLine.Option; -import picocli.CommandLine.Parameters; - -/** - * This is the handler that process delete container command. - */ -@Command( - name = "delete", - description = "Delete container", - mixinStandardHelpOptions = true, - versionProvider = HddsVersionProvider.class) -public class DeleteSubcommand extends ScmSubcommand { - - @Parameters(description = "Id of the container to close") - private long containerId; - - @Option(names = {"-f", - "--force"}, description = "forcibly delete the container") - private boolean force; - - @Override - public void execute(ScmClient scmClient) throws IOException { - checkContainerExists(scmClient, containerId); - scmClient.deleteContainer(containerId, force); - } -} From 0e93b9118e00ff1f3437484da7d068c0bd40ee0f Mon Sep 17 00:00:00 2001 From: George Jahad Date: Fri, 23 Jul 2021 15:19:54 -0700 Subject: [PATCH 2/3] removed from acceptance test --- hadoop-ozone/dist/src/main/smoketest/admincli/container.robot | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hadoop-ozone/dist/src/main/smoketest/admincli/container.robot b/hadoop-ozone/dist/src/main/smoketest/admincli/container.robot index dfdeb7c1ece6..a36db81707cd 100644 --- a/hadoop-ozone/dist/src/main/smoketest/admincli/container.robot +++ b/hadoop-ozone/dist/src/main/smoketest/admincli/container.robot @@ -75,7 +75,6 @@ Incomplete command Should contain ${output} Incomplete command Should contain ${output} list Should contain ${output} info - Should contain ${output} delete Should contain ${output} create Should contain ${output} close @@ -88,6 +87,3 @@ Cannot close container without admin privilege Cannot create container without admin privilege Requires admin privilege ozone admin container create - -Cannot delete container without admin privilege - Requires admin privilege ozone admin container delete "${CONTAINER}" From 04f75705aefb6a48c7e8a366dae46753dd75ab13 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 27 Jul 2021 12:01:02 -0700 Subject: [PATCH 3/3] Retrigger CI Change-Id: I08e6e4601e863cefc15f0a305e586db4eeb58d45