diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone b/hadoop-ozone/dist/src/shell/ozone/ozone index d3d226a8b89..bfecc2ae57f 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone +++ b/hadoop-ozone/dist/src/shell/ozone/ozone @@ -206,7 +206,7 @@ function ozonecmd_case OZONE_RUN_ARTIFACT_NAME="ozone-tools" ;; genconf) - OZONE_CLASSNAME=org.apache.hadoop.ozone.genconf.GenerateOzoneRequiredConfigurations + OZONE_CLASSNAME=org.apache.hadoop.ozone.cli.GenerateOzoneRequiredConfigurations OZONE_RUN_ARTIFACT_NAME="ozone-tools" ;; dtutil) @@ -230,7 +230,7 @@ function ozonecmd_case OZONE_RUN_ARTIFACT_NAME="ozone-tools" ;; checknative) - OZONE_CLASSNAME=org.apache.hadoop.ozone.shell.checknative.CheckNative + OZONE_CLASSNAME=org.apache.hadoop.ozone.cli.CheckNative OZONE_RUN_ARTIFACT_NAME="ozone-tools" ;; ratis) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokensCLI.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/admin/TestBlockTokensCLI.java similarity index 98% rename from hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokensCLI.java rename to hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/admin/TestBlockTokensCLI.java index 4c6b9b2aaf1..37f4881bc37 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokensCLI.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/admin/TestBlockTokensCLI.java @@ -15,11 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.ozone; +package org.apache.hadoop.ozone.admin; import com.google.common.collect.Maps; import org.apache.hadoop.hdds.annotation.InterfaceAudience; -import org.apache.hadoop.ozone.admin.OzoneAdmin; import org.apache.hadoop.hdds.conf.DefaultConfigManager; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import org.apache.hadoop.hdds.scm.ScmConfig; @@ -28,6 +27,8 @@ import org.apache.hadoop.hdds.security.symmetric.SecretKeyManager; import org.apache.hadoop.hdds.utils.IOUtils; import org.apache.hadoop.minikdc.MiniKdc; +import org.apache.hadoop.ozone.MiniOzoneCluster; +import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl; import org.apache.hadoop.ozone.client.OzoneClient; import org.apache.hadoop.ozone.om.OzoneManager; import org.apache.hadoop.security.UserGroupInformation; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystemPrefixParser.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/debug/om/TestPrefixParser.java similarity index 97% rename from hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystemPrefixParser.java rename to hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/debug/om/TestPrefixParser.java index cc1780a2c1e..0d325711c1a 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystemPrefixParser.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/debug/om/TestPrefixParser.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.hadoop.fs.ozone; +package org.apache.hadoop.ozone.debug.om; import org.apache.hadoop.hdds.utils.IOUtils; import org.apache.commons.lang3.RandomStringUtils; @@ -28,7 +28,6 @@ import org.apache.hadoop.ozone.OzoneConsts; import org.apache.hadoop.ozone.TestDataUtil; import org.apache.hadoop.ozone.client.OzoneClient; -import org.apache.hadoop.ozone.debug.om.PrefixParser; import org.apache.hadoop.ozone.om.OMStorage; import org.apache.hadoop.ozone.om.helpers.BucketLayout; import org.junit.jupiter.api.AfterAll; @@ -45,7 +44,7 @@ * Test Ozone Prefix Parser. */ @Timeout(120) -public class TestOzoneFileSystemPrefixParser { +public class TestPrefixParser { private static MiniOzoneCluster cluster = null; diff --git a/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml b/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml index d263a069b6d..2c4d5ece6a1 100644 --- a/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml +++ b/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml @@ -19,11 +19,11 @@ - + - + diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/checknative/CheckNative.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/CheckNative.java similarity index 98% rename from hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/checknative/CheckNative.java rename to hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/CheckNative.java index 1298811fa40..942154238ae 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/checknative/CheckNative.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/CheckNative.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.hadoop.ozone.shell.checknative; +package org.apache.hadoop.ozone.cli; import org.apache.hadoop.hdds.cli.GenericCli; import org.apache.hadoop.hdds.utils.NativeLibraryLoader; diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genconf/GenerateOzoneRequiredConfigurations.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/GenerateOzoneRequiredConfigurations.java similarity index 99% rename from hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genconf/GenerateOzoneRequiredConfigurations.java rename to hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/GenerateOzoneRequiredConfigurations.java index c29a90ec0d0..e3d4025f837 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genconf/GenerateOzoneRequiredConfigurations.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/GenerateOzoneRequiredConfigurations.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.hadoop.ozone.genconf; +package org.apache.hadoop.ozone.cli; import org.apache.hadoop.hdds.cli.GenericCli; import org.apache.hadoop.hdds.cli.HddsVersionProvider; diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/package-info.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/package-info.java new file mode 100644 index 00000000000..751f37a98d8 --- /dev/null +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/cli/package-info.java @@ -0,0 +1,23 @@ +/* + * 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. + */ + +/** + * Miscellaneous CLI commands. + */ +package org.apache.hadoop.ozone.cli; diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genconf/package-info.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genconf/package-info.java deleted file mode 100644 index 4817d392dbf..00000000000 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/genconf/package-info.java +++ /dev/null @@ -1,24 +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.ozone.genconf; - -/** - * Command line tool to generate required Ozone configs to an ozone-site.xml. - */ - diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/scm/cli/package-info.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/scm/cli/package-info.java deleted file mode 100644 index 4c38ae0bd20..00000000000 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/scm/cli/package-info.java +++ /dev/null @@ -1,22 +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.ozone.scm.cli; - -/** - * Command line helpers for scm management. - */ diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/checknative/package-info.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/checknative/package-info.java deleted file mode 100644 index ba46d6d471d..00000000000 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/checknative/package-info.java +++ /dev/null @@ -1,22 +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 for commands related to checking native libraries. - */ -package org.apache.hadoop.ozone.shell.checknative; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/TestDecommissionScmSubcommand.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/admin/scm/TestDecommissionScmSubcommand.java similarity index 97% rename from hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/TestDecommissionScmSubcommand.java rename to hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/admin/scm/TestDecommissionScmSubcommand.java index 623948a11b7..c7d8c72ee50 100644 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/TestDecommissionScmSubcommand.java +++ b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/admin/scm/TestDecommissionScmSubcommand.java @@ -15,12 +15,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.ozone.scm; +package org.apache.hadoop.ozone.admin.scm; import org.apache.hadoop.ozone.admin.OzoneAdmin; import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionScmResponseProto; import org.apache.hadoop.hdds.scm.client.ScmClient; -import org.apache.hadoop.ozone.admin.scm.DecommissionScmSubcommand; import org.apache.ozone.test.GenericTestUtils; import java.io.IOException; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/TestGetScmRatisRolesSubcommand.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/admin/scm/TestGetScmRatisRolesSubcommand.java similarity index 96% rename from hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/TestGetScmRatisRolesSubcommand.java rename to hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/admin/scm/TestGetScmRatisRolesSubcommand.java index 346b448cc25..73672bb8631 100644 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/TestGetScmRatisRolesSubcommand.java +++ b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/admin/scm/TestGetScmRatisRolesSubcommand.java @@ -15,10 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.ozone.scm; +package org.apache.hadoop.ozone.admin.scm; import org.apache.hadoop.hdds.scm.client.ScmClient; -import org.apache.hadoop.ozone.admin.scm.GetScmRatisRolesSubcommand; import org.apache.ozone.test.GenericTestUtils; import org.junit.jupiter.api.Test; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/checknative/TestCheckNative.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/cli/TestCheckNative.java similarity index 96% rename from hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/checknative/TestCheckNative.java rename to hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/cli/TestCheckNative.java index 0dc1fde57fa..a5487e733d8 100644 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/checknative/TestCheckNative.java +++ b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/cli/TestCheckNative.java @@ -16,9 +16,8 @@ * limitations under the License. */ -package org.apache.hadoop.ozone.checknative; +package org.apache.hadoop.ozone.cli; -import org.apache.hadoop.ozone.shell.checknative.CheckNative; import org.apache.ozone.test.tag.Native; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.AfterEach; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/genconf/TestGenerateOzoneRequiredConfigurations.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/cli/TestGenerateOzoneRequiredConfigurations.java similarity index 99% rename from hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/genconf/TestGenerateOzoneRequiredConfigurations.java rename to hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/cli/TestGenerateOzoneRequiredConfigurations.java index 6d264456682..31772a1dd83 100644 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/genconf/TestGenerateOzoneRequiredConfigurations.java +++ b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/cli/TestGenerateOzoneRequiredConfigurations.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.hadoop.ozone.genconf; +package org.apache.hadoop.ozone.cli; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import static org.assertj.core.api.Assertions.assertThat; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/fsck/package-info.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/fsck/package-info.java deleted file mode 100644 index 0de014c625f..00000000000 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/fsck/package-info.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Package info. - *

- * 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. - *

- * fsck tool. - */ - -/** - * 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. - */ - -/** - * fsck tool. - */ - - -package org.apache.hadoop.ozone.fsck; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/genconf/package-info.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/genconf/package-info.java deleted file mode 100644 index 8f58a82a8de..00000000000 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/genconf/package-info.java +++ /dev/null @@ -1,22 +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.ozone.genconf; -/** - * Tests for ozone genconf tool - */ diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/om/package-info.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/om/package-info.java deleted file mode 100644 index 1db31e12856..00000000000 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/om/package-info.java +++ /dev/null @@ -1,22 +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. - * - */ -/** - * OM to SQL Converter. Currently broken. - */ -package org.apache.hadoop.ozone.om; diff --git a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/package-info.java b/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/package-info.java deleted file mode 100644 index 291fcd9791d..00000000000 --- a/hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/scm/package-info.java +++ /dev/null @@ -1,22 +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. - * - */ -/** - * A tool to convert Ozone manager Metadata to SQL DB. - */ -package org.apache.hadoop.ozone.scm; diff --git a/pom.xml b/pom.xml index 9477d0fb97d..2e81096d1fc 100644 --- a/pom.xml +++ b/pom.xml @@ -2221,6 +2221,7 @@ org.apache.hadoop.hdds.** + org.apache.hadoop.hdds.scm.cli.** org.apache.hadoop.hdds.scm.container.** ${unstable-test-groups} @@ -2242,12 +2243,14 @@ org.apache.hadoop.ozone.** + org.apache.hadoop.ozone.admin.** org.apache.hadoop.ozone.client.** org.apache.hadoop.ozone.container.** org.apache.hadoop.ozone.debug.** org.apache.hadoop.ozone.freon.** org.apache.hadoop.ozone.om.** org.apache.hadoop.ozone.recon.** + org.apache.hadoop.ozone.repair.** org.apache.hadoop.ozone.shell.** ${unstable-test-groups} @@ -2282,8 +2285,11 @@ maven-surefire-plugin + org.apache.hadoop.hdds.scm.cli.** + org.apache.hadoop.ozone.admin.** org.apache.hadoop.ozone.debug.** org.apache.hadoop.ozone.freon.** + org.apache.hadoop.ozone.repair.** org.apache.hadoop.ozone.shell.** ${unstable-test-groups}