Review Board 1.7.22


Client shell variable substitution for recent commands

Review Request #8842 - Created Jan. 5, 2013 and updated

Vasanth kumar RJ
SQOOP-811
Reviewers
Sqoop
sqoop-sqoop2
execute() method is replaced with executeCommand() method in all Command classes. executed() method overrided in SqoopCommand which resolves the variables and then executes the command.

 
client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java
Revision 827d168 New Change
[20] 39 lines
[+20] [+] public class CloneCommand extends SqoopCommand {
40
    super(shell, Constants.CMD_CLONE, Constants.CMD_CLONE_SC,
40
    super(shell, Constants.CMD_CLONE, Constants.CMD_CLONE_SC,
41
      new String[] {Constants.FN_CONNECTION, Constants.FN_JOB},
41
      new String[] {Constants.FN_CONNECTION, Constants.FN_JOB},
42
      Constants.PRE_CLONE, Constants.SUF_INFO);
42
      Constants.PRE_CLONE, Constants.SUF_INFO);
43
  }
43
  }
44

    
   
44

   
45
  public Object execute(List args) {
45
  public Object executeCommand(List args) {
46
    String usageMsg = MessageFormat.format(getResource().getString(Constants
46
    String usageMsg = MessageFormat.format(getResource().getString(Constants
47
        .RES_CLONE_USAGE), getUsage());
47
        .RES_CLONE_USAGE), getUsage());
48

    
   
48

   
49
    if (args.size() == 0) {
49
    if (args.size() == 0) {
50
      io.out.println(usageMsg);
50
      io.out.println(usageMsg);
[+20] [20] 20 lines
client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java
Revision ad4d8fd New Change
 
client/src/main/java/org/apache/sqoop/client/shell/DeleteCommand.java
Revision 5ab6495 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java
Revision fb6e8c8 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowCommand.java
Revision efbb8f2 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SqoopCommand.java
Revision d818353 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SubmissionCommand.java
Revision 2e1fb03 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/UpdateCommand.java
Revision d73b40e New Change
 
  1. client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java: Loading...
  3. client/src/main/java/org/apache/sqoop/client/shell/DeleteCommand.java: Loading...
  4. client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java: Loading...
  5. client/src/main/java/org/apache/sqoop/client/shell/ShowCommand.java: Loading...
  6. client/src/main/java/org/apache/sqoop/client/shell/SqoopCommand.java: Loading...
  7. client/src/main/java/org/apache/sqoop/client/shell/SubmissionCommand.java: Loading...
  8. client/src/main/java/org/apache/sqoop/client/shell/UpdateCommand.java: Loading...