List of usage examples for org.apache.hadoop.cli.util CLICommand getType
public CLICommandTypes getType();
From source file:org.apache.bigtop.itest.hadoop.hcfs.TestCLI.java
License:Apache License
/** * Execute given hadoop FsShell command (via Toolrunner). *//*from w w w . j a v a2 s.com*/ @Override protected CommandExecutor.Result execute(CLICommand cmd) throws Exception { if (cmd.getType() instanceof CLICommandFS) { CommandExecutor cmdExecutor = new FSCmdExecutor(namenode, new FsShell(conf)); return cmdExecutor.executeCommand(cmd.getCmd()); } else { throw new IllegalArgumentException("Unknown type of test command: " + cmd.getType()); } }
From source file:org.apache.bigtop.itest.hadoop.hdfs.TestCLI.java
License:Apache License
@Override protected CommandExecutor.Result execute(CLICommand cmd) throws Exception { if (cmd.getType() instanceof CLICommandFS) { CommandExecutor cmdExecutor = new FSCmdExecutor(nn, new FsShell(conf)); return cmdExecutor.executeCommand(cmd.getCmd()); } else {/*w w w. j ava 2 s . c om*/ throw new IllegalArgumentException("Unknown type of test command: " + cmd.getType()); } }