List of usage examples for org.apache.hadoop.cli.util CLICommand getCmd
public String getCmd();
From source file:org.apache.bigtop.itest.hadoop.hcfs.TestCLI.java
License:Apache License
/** * Execute given hadoop FsShell command (via Toolrunner). */// w w w. j ava 2s .c o m @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 {//from w w w . j av a2 s .c om throw new IllegalArgumentException("Unknown type of test command: " + cmd.getType()); } }