Skip to content

Commit

Permalink
HDDS-3340. Move Ozone Shell from ozone-manager to tools
Browse files Browse the repository at this point in the history
Closes #775
  • Loading branch information
adoroszlai authored and elek committed Apr 9, 2020
1 parent eb177f4 commit ebc6160
Show file tree
Hide file tree
Showing 72 changed files with 176 additions and 213 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* 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
Expand All @@ -15,21 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone;

/**
This package contains class that support ozone implementation on the datanode
side.
Main parts of ozone on datanode are:
1. REST Interface - This code lives under the web directory and listens to the
WebHDFS port.
2. Datanode container classes: This support persistence of ozone objects on
datanode. These classes live under container directory.
3. Client and Shell: We also support a ozone REST client lib, they are under
web/client and web/ozShell.
* This package contains class that support ozone implementation on the datanode
* side. Datanode container classes support persistence of ozone objects on
* datanode. These classes live under container directory.
*/
package org.apache.hadoop.ozone;
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
-->
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="OzoneShell" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="org.apache.hadoop.ozone.web.ozShell.OzoneShell" />
<module name="hadoop-ozone-ozone-manager" />
<option name="MAIN_CLASS_NAME" value="org.apache.hadoop.ozone.shell.OzoneShell" />
<module name="hadoop-ozone-tools" />
<option name="PROGRAM_PARAMETERS" value="-conf=hadoop-ozone/dev-support/intellij/ozone-site.xml volume create /vol1" />
<option name="VM_PARAMETERS" value="-Dlog4j.configuration=file:hadoop-ozone/dev-support/intellij/log4j.properties" />
<extension name="coverage">
Expand All @@ -30,4 +30,4 @@
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
8 changes: 4 additions & 4 deletions hadoop-ozone/dist/src/shell/ozone/ozone
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ function ozonecmd_case
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-ozone-manager"
;;
sh | shell)
HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.OzoneShell
HADOOP_CLASSNAME=org.apache.hadoop.ozone.shell.OzoneShell
HDFS_OM_SH_OPTS="${HDFS_OM_SH_OPTS} -Dhadoop.log.file=ozone-shell.log
-Dlog4j.configuration=file:${ozone_shell_log4j}"
HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_OM_SH_OPTS}"
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-ozone-manager"
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
;;
s3)
HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.s3.S3Shell
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-ozone-manager"
HADOOP_CLASSNAME=org.apache.hadoop.ozone.shell.s3.S3Shell
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
;;
scm)
HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.ozShell;
package org.apache.hadoop.ozone.shell;

import static org.junit.Assert.fail;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.ozShell;
package org.apache.hadoop.ozone.shell;

import com.google.common.base.Strings;
import org.apache.hadoop.fs.FileUtil;
Expand All @@ -26,9 +26,7 @@
import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.hadoop.ozone.web.ozShell.OzoneShell;
import org.apache.hadoop.ozone.web.ozShell.Shell;
import org.apache.hadoop.ozone.web.ozShell.s3.S3Shell;
import org.apache.hadoop.ozone.shell.s3.S3Shell;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.test.GenericTestUtils;
import org.junit.After;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.ozShell;
package org.apache.hadoop.ozone.shell;

import com.google.common.base.Strings;
import org.apache.hadoop.fs.FileUtil;
Expand All @@ -27,7 +27,7 @@
import org.apache.hadoop.ozone.client.rpc.RpcClient;
import org.apache.hadoop.ozone.om.exceptions.OMException;
import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
import org.apache.hadoop.ozone.web.ozShell.s3.S3Shell;
import org.apache.hadoop.ozone.shell.s3.S3Shell;
import org.apache.hadoop.test.GenericTestUtils;
import org.junit.After;
import org.junit.AfterClass;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.web.ozShell;
package org.apache.hadoop.ozone.shell;

import java.io.IOException;
import java.io.PrintStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell;
package org.apache.hadoop.ozone.shell;

import picocli.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell;
package org.apache.hadoop.ozone.shell;

import java.io.IOException;
import java.io.PrintStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell;
package org.apache.hadoop.ozone.shell;

import org.apache.hadoop.hdds.cli.HddsVersionProvider;
import org.apache.hadoop.hdds.tracing.TracingUtil;
import org.apache.hadoop.ozone.web.ozShell.bucket.BucketCommands;
import org.apache.hadoop.ozone.web.ozShell.keys.KeyCommands;
import org.apache.hadoop.ozone.web.ozShell.token.TokenCommands;
import org.apache.hadoop.ozone.web.ozShell.volume.VolumeCommands;
import org.apache.hadoop.ozone.shell.bucket.BucketCommands;
import org.apache.hadoop.ozone.shell.keys.KeyCommands;
import org.apache.hadoop.ozone.shell.token.TokenCommands;
import org.apache.hadoop.ozone.shell.volume.VolumeCommands;

import io.opentracing.Scope;
import io.opentracing.util.GlobalTracer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.web.ozShell;
package org.apache.hadoop.ozone.shell;

import org.apache.hadoop.hdds.cli.GenericCli;
import org.apache.hadoop.ozone.om.exceptions.OMException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell;
package org.apache.hadoop.ozone.shell;

import org.apache.hadoop.ozone.security.acl.OzoneObj;
import picocli.CommandLine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.acl;
package org.apache.hadoop.ozone.shell.acl;

import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.security.acl.OzoneObj;
import org.apache.hadoop.ozone.web.ozShell.Handler;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.shell.OzoneAddress;
import org.apache.hadoop.ozone.shell.StoreTypeOption;
import org.apache.hadoop.ozone.shell.Handler;

import org.apache.hadoop.ozone.web.ozShell.StoreTypeOption;
import picocli.CommandLine;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.acl;
package org.apache.hadoop.ozone.shell.acl;

import com.google.common.collect.ImmutableList;
import org.apache.hadoop.ozone.OzoneAcl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.acl;
package org.apache.hadoop.ozone.shell.acl;

import org.apache.hadoop.ozone.OzoneAcl;
import org.apache.hadoop.ozone.client.OzoneClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
/**
* Helpers for ACL commands.
*/
package org.apache.hadoop.ozone.web.ozShell.acl;
package org.apache.hadoop.ozone.shell.acl;
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.security.acl.OzoneObj;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.web.ozShell.acl.AclHandler;
import org.apache.hadoop.ozone.web.ozShell.acl.AclOption;
import org.apache.hadoop.ozone.shell.OzoneAddress;
import org.apache.hadoop.ozone.shell.acl.AclHandler;
import org.apache.hadoop.ozone.shell.acl.AclOption;
import picocli.CommandLine;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import java.util.concurrent.Callable;

import org.apache.hadoop.hdds.cli.GenericParentCommand;
import org.apache.hadoop.hdds.cli.HddsVersionProvider;
import org.apache.hadoop.hdds.cli.MissingSubcommandException;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.ozone.web.ozShell.Shell;
import org.apache.hadoop.ozone.shell.Shell;

import picocli.CommandLine.Command;
import picocli.CommandLine.ParentCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.ozone.web.ozShell.Handler;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.shell.Handler;
import org.apache.hadoop.ozone.shell.OzoneAddress;
import picocli.CommandLine;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.ozone.client.OzoneClientException;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.web.ozShell.Shell;
import org.apache.hadoop.ozone.shell.Shell;
import org.apache.hadoop.ozone.shell.OzoneAddress;
import picocli.CommandLine;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.hdds.protocol.StorageType;
import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.client.BucketArgs;
import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneVolume;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.shell.OzoneAddress;

import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneVolume;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.shell.OzoneAddress;

import picocli.CommandLine.Command;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.web.ozShell.acl.AclHandler;
import org.apache.hadoop.ozone.web.ozShell.acl.GetAclHandler;
import org.apache.hadoop.ozone.shell.OzoneAddress;
import org.apache.hadoop.ozone.shell.acl.AclHandler;
import org.apache.hadoop.ozone.shell.acl.GetAclHandler;
import picocli.CommandLine;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.shell.OzoneAddress;

import picocli.CommandLine.Command;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
* limitations under the License.
*/

package org.apache.hadoop.ozone.web.ozShell.bucket;
package org.apache.hadoop.ozone.shell.bucket;

import java.io.IOException;
import java.util.Iterator;

import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneVolume;
import org.apache.hadoop.ozone.web.ozShell.ListOptions;
import org.apache.hadoop.ozone.web.ozShell.OzoneAddress;
import org.apache.hadoop.ozone.shell.ListOptions;
import org.apache.hadoop.ozone.shell.OzoneAddress;
import org.apache.hadoop.ozone.shell.volume.VolumeHandler;

import org.apache.hadoop.ozone.web.ozShell.volume.VolumeHandler;
import picocli.CommandLine;
import picocli.CommandLine.Command;

Expand Down
Loading

0 comments on commit ebc6160

Please sign in to comment.