Review Board 1.7.22


SQOOP-694 Introduce client "verbose" mode

Review Request #8045 - Created Nov. 14, 2012 and submitted

Jarek Cecho
SQOOP-694
Reviewers
Sqoop
sqoop-sqoop2
I've implemented rather general option on client to set various options and provided first implementation for "verbose" mode.
Tested on real cluster.
client/src/main/java/org/apache/sqoop/client/core/Environment.java
Revision aa8c989 New Change
[20] 27 lines
[+20]
28

    
   
28

   
29
  private static String serverHost;
29
  private static String serverHost;
30
  private static String serverPort;
30
  private static String serverPort;
31
  private static String serverWebapp;
31
  private static String serverWebapp;
32

    
   
32

   

    
   
33
  private static boolean verbose;

    
   
34

   
33
  private static final String HOST_DEFAULT = "vm-sqoop2";
35
  private static final String HOST_DEFAULT = "vm-sqoop2";
34
  private static final String PORT_DEFAULT = "8080";
36
  private static final String PORT_DEFAULT = "8080";
35
  private static final String WEBAPP_DEFAULT = "sqoop";
37
  private static final String WEBAPP_DEFAULT = "sqoop";

    
   
38
  private static final boolean VERBOSE_DEFAULT = false;
36

    
   
39

   
37
  private static ResourceBundle resourceBundle;
40
  private static ResourceBundle resourceBundle;
38

    
   
41

   
39
  static {
42
  static {
40
    serverHost = HOST_DEFAULT;
43
    serverHost = HOST_DEFAULT;
41
    serverPort = PORT_DEFAULT;
44
    serverPort = PORT_DEFAULT;
42
    serverWebapp = WEBAPP_DEFAULT;
45
    serverWebapp = WEBAPP_DEFAULT;

    
   
46
    verbose = VERBOSE_DEFAULT;
43

    
   
47

   
44
    resourceBundle =
48
    resourceBundle =
45
      ResourceBundle.getBundle(Constants.RESOURCE_NAME, Locale.getDefault());
49
      ResourceBundle.getBundle(Constants.RESOURCE_NAME, Locale.getDefault());
46
  }
50
  }
47

    
   
51

   
[+20] [20] 26 lines
[+20] [+] public static String getServerUrl() {
74
  }
78
  }
75

    
   
79

   
76
  public static ResourceBundle getResourceBundle() {
80
  public static ResourceBundle getResourceBundle() {
77
    return resourceBundle;
81
    return resourceBundle;
78
  }
82
  }

    
   
83

   

    
   
84
  public static void setVerbose(boolean newValue) {

    
   
85
    verbose = newValue;

    
   
86
  }

    
   
87

   

    
   
88
  public static boolean isVerboose() {

    
   
89
    return verbose;

    
   
90
  }
79
}
91
}
client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java
Revision 377c827 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SetOptionFunction.java
New File
 
client/src/main/java/org/apache/sqoop/client/utils/ThrowableDisplayer.java
Revision c8f8223 New Change
 
  1. client/src/main/java/org/apache/sqoop/client/core/Environment.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/SetCommand.java: Loading...
  3. client/src/main/java/org/apache/sqoop/client/shell/SetOptionFunction.java: Loading...
  4. client/src/main/java/org/apache/sqoop/client/utils/ThrowableDisplayer.java: Loading...