@Override protected CommandExecutor.Result execute(CLITestData.TestCmd cmd) throws Exception { return CmdFactory.getCommandExecutor(cmd, "").executeCommand(cmd.getCmd()); }
@Override protected Result execute(TestCmd cmd) throws Exception { return CmdFactoryDFS.getCommandExecutor(cmd, namenode).executeCommand(cmd.getCmd()); }
public static CommandExecutor getCommandExecutor(CLITestData.TestCmd cmd, String tag) throws IllegalArgumentException { CommandExecutor executor; switch (cmd.getType()) { case DFSADMIN: executor = new CLICommands.FSCmdExecutor(tag, new DFSAdmin()); break; default: executor = CmdFactory.getCommandExecutor(cmd, tag); } return executor; } }
@Override protected Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor(namenode).executeCommand(cmd.getCmd()); }
@Override public CommandExecutor getExecutor(String tag) throws IllegalArgumentException { if (getType() instanceof CLICommandFS) return new FSCmdExecutor(tag, new FsShell()); throw new IllegalArgumentException("Unknown type of test command: " + getType()); }
/** * this method has to be overridden by an ancestor */ protected CommandExecutor.Result execute(CLICommand cmd) throws Exception { throw new Exception("Unknown type of test command:"+ cmd.getType()); }
@Override public CommandExecutor getExecutor(String tag) throws IllegalArgumentException { if (getType() instanceof CLICommandDFSAdmin) return new FSCmdExecutor(tag, new DFSAdmin()); return super.getExecutor(tag); } }
@Override protected void execute(final String cmd) throws Exception{ String[] args = getCommandAsArgs(cmd, "NAMENODE", this.namenode); ToolRunner.run(shell, args); } }
@Override public CommandExecutor getExecutor(String tag) throws IllegalArgumentException { if (getType() instanceof CLICommandCryptoAdmin) { return new CryptoAdminCmdExecutor(tag, new CryptoAdmin(conf)); } return super.getExecutor(tag); } }
@Override public CommandExecutor getExecutor(String tag) throws IllegalArgumentException { if (getType() instanceof CLICommandCacheAdmin) { return new CacheAdminCmdExecutor(tag, new CacheAdmin(conf)); } return super.getExecutor(tag); } }
@Override protected void execute(final String cmd) throws Exception { String[] args = getCommandAsArgs(cmd, "NAMENODE", this.namenode); ToolRunner.run(admin, args); } }
@Override protected void execute(final String cmd) throws Exception { String[] args = getCommandAsArgs(cmd, "NAMENODE", this.namenode); ToolRunner.run(admin, args); } }
@Override protected CommandExecutor.Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor("").executeCommand(cmd.getCmd()); }
@Override public CommandExecutor getExecutor(String tag) throws IllegalArgumentException { if (getType() instanceof CLICommandFS) return new FSCmdExecutor(tag, new FsShell()); throw new IllegalArgumentException("Unknown type of test command: " + getType()); }
/** * this method has to be overridden by an ancestor */ protected CommandExecutor.Result execute(CLICommand cmd) throws Exception { throw new Exception("Unknown type of test command:"+ cmd.getType()); }
@Override protected Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor(namenode).executeCommand(cmd.getCmd()); }
@Override protected CommandExecutor.Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor("").executeCommand(cmd.getCmd()); }
@Override protected Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor(namenode).executeCommand(cmd.getCmd()); }
@Override protected Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor("").executeCommand(cmd.getCmd()); }
@Override protected Result execute(CLICommand cmd) throws Exception { return cmd.getExecutor(namenode).executeCommand(cmd.getCmd()); }