|
@@ -19,19 +19,10 @@
|
|
package org.apache.hadoop.ozone.web.ozShell;
|
|
package org.apache.hadoop.ozone.web.ozShell;
|
|
|
|
|
|
import org.apache.hadoop.hdds.cli.GenericCli;
|
|
import org.apache.hadoop.hdds.cli.GenericCli;
|
|
-import org.apache.hadoop.hdds.cli.HddsVersionProvider;
|
|
|
|
-import org.apache.hadoop.hdds.tracing.TracingUtil;
|
|
|
|
import org.apache.hadoop.ozone.om.exceptions.OMException;
|
|
import org.apache.hadoop.ozone.om.exceptions.OMException;
|
|
-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 io.opentracing.Scope;
|
|
|
|
-import io.opentracing.util.GlobalTracer;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
-import picocli.CommandLine.Command;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* Ozone user interface commands.
|
|
* Ozone user interface commands.
|
|
@@ -39,17 +30,7 @@ import picocli.CommandLine.Command;
|
|
* This class uses dispatch method to make calls
|
|
* This class uses dispatch method to make calls
|
|
* to appropriate handlers that execute the ozone functions.
|
|
* to appropriate handlers that execute the ozone functions.
|
|
*/
|
|
*/
|
|
-@Command(name = "ozone sh",
|
|
|
|
- description = "Shell for Ozone object store",
|
|
|
|
- subcommands = {
|
|
|
|
- VolumeCommands.class,
|
|
|
|
- BucketCommands.class,
|
|
|
|
- KeyCommands.class,
|
|
|
|
- TokenCommands.class
|
|
|
|
- },
|
|
|
|
- versionProvider = HddsVersionProvider.class,
|
|
|
|
- mixinStandardHelpOptions = true)
|
|
|
|
-public class Shell extends GenericCli {
|
|
|
|
|
|
+public abstract class Shell extends GenericCli {
|
|
|
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(Shell.class);
|
|
private static final Logger LOG = LoggerFactory.getLogger(Shell.class);
|
|
|
|
|
|
@@ -75,23 +56,7 @@ public class Shell extends GenericCli {
|
|
// General options
|
|
// General options
|
|
public static final int DEFAULT_OZONE_PORT = 50070;
|
|
public static final int DEFAULT_OZONE_PORT = 50070;
|
|
|
|
|
|
- @Override
|
|
|
|
- public void execute(String[] argv) {
|
|
|
|
- TracingUtil.initTracing("shell");
|
|
|
|
- try (Scope scope = GlobalTracer.get().buildSpan("main").startActive(true)) {
|
|
|
|
- super.execute(argv);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
- /**
|
|
|
|
- * Main for the ozShell Command handling.
|
|
|
|
- *
|
|
|
|
- * @param argv - System Args Strings[]
|
|
|
|
- * @throws Exception
|
|
|
|
- */
|
|
|
|
- public static void main(String[] argv) throws Exception {
|
|
|
|
- new Shell().run(argv);
|
|
|
|
- }
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
protected void printError(Throwable errorArg) {
|
|
protected void printError(Throwable errorArg) {
|