Review Board 1.7.22


Sqoop2: Help option for shell command functions

Review Request #10100 - Created March 24, 2013 and updated

Vasanth kumar RJ
sqoop-965
Reviewers
Sqoop
sqoop-sqoop2
There is no help option for shell command's functions. Introducing the help argument for functions.
Done

Diff revision 3 (Latest)

1 2 3
1 2 3

  1. client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/SqoopFunction.java: Loading...
client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java
Revision c6f831d New Change
[20] 57 lines
[+20] [+] public String getHelp() {
58
  @Override
58
  @Override
59
  public Object execute(List args) {
59
  public Object execute(List args) {
60
    if (args.size() == 0) {
60
    if (args.size() == 0) {
61
      list();
61
      list();
62
    }
62
    }
63
    else {
63
    else if(args.size() == 1) {
64
      help((String)args.get(0));
64
      help((String)args.get(0));

    
   
65
    } else {

    
   
66
      StringBuilder sb = new StringBuilder();

    
   
67
      for(Object cmd : args) {

    
   
68
        sb.append((String)cmd);

    
   
69
        sb.append(" ");

    
   
70
      }

    
   
71
      sb.append(Constants.CMD_HELP);

    
   
72
      shell.execute(sb.toString());
65
    }
73
    }
66
    return null;
74
    return null;
67
  }
75
  }
68

    
   
76

   
69
  @SuppressWarnings("unchecked")
77
  @SuppressWarnings("unchecked")
[+20] [20] 84 lines
client/src/main/java/org/apache/sqoop/client/shell/SqoopFunction.java
Revision bf26761 New Change
 
  1. client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/SqoopFunction.java: Loading...