Review Board 1.7.22


SQOOP-972 Sqoop2: Load server URL from environment in shell

Review Request #10203 - Created March 30, 2013 and submitted

Jarek Cecho
SQOOP-972
Reviewers
Sqoop
sqoop-sqoop2
I've created environmental variables that will be fetched for Sqoop2 server default hostname (port, ...). Please note that resource file (if it exists) will have precedence over the environmental variables in current implementation.
I've done manual testing as we currently do not have tests for shell component.

Diff revision 2 (Latest)

1 2
1 2

  1. client/src/main/java/org/apache/sqoop/client/core/Constants.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/ShellEnvironment.java: Loading...
client/src/main/java/org/apache/sqoop/client/core/Constants.java
Revision cc956d0f9306a08ef9084e7b878f82e3e355d617 New Change
[20] 24 lines
[+20] [+] public class Constants {
25
  // General string constants
25
  // General string constants
26
  public static final String RESOURCE_NAME = "client-resource";
26
  public static final String RESOURCE_NAME = "client-resource";
27
  public static final String BOLD_STR_SEQUENCE = "@|bold";
27
  public static final String BOLD_STR_SEQUENCE = "@|bold";
28
  public static final String END_STR_SEQUENCE = "|@";
28
  public static final String END_STR_SEQUENCE = "|@";
29

    
   
29

   

    
   
30
  // Environmental variables

    
   
31
  public static final String ENV_HOST = "SQOOP2_HOST";

    
   
32
  public static final String ENV_PORT = "SQOOP2_PORT";

    
   
33
  public static final String ENV_WEBAPP = "SQOOP2_WEBAPP";

    
   
34

   
30
  // Options
35
  // Options
31

    
   
36

   
32
  public static final String OPT_XID = "xid";
37
  public static final String OPT_XID = "xid";
33
  public static final String OPT_ALL = "all";
38
  public static final String OPT_ALL = "all";
34
  public static final String OPT_JID = "jid";
39
  public static final String OPT_JID = "jid";
[+20] [20] 322 lines
client/src/main/java/org/apache/sqoop/client/shell/ShellEnvironment.java
Revision 25ae364641c7a03e8394ac14991370fc6f810745 New Change
 
  1. client/src/main/java/org/apache/sqoop/client/core/Constants.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/ShellEnvironment.java: Loading...