Review Board 1.7.22


SQOOP-884 Sqoop2: Disable interactive client commands in batch mode

Review Request #9465 - Created Feb. 15, 2013 and submitted

Jarek Cecho
SQOOP-884
Reviewers
Sqoop
sqoop-sqoop2
I've enhanced the client to keep track whether it's being executed in batch or interactive mode. Usage of pure interactive commands (update, create, clone) in batch mode will throw an exception rather than "freezing" the program  by waiting on input that might never come.

 
client/src/main/java/org/apache/sqoop/client/core/ClientError.java
Revision fd3b97d80491eeda6b7fabef11dcd5878729bbf5 New Change
[20] 39 lines
[+20]
40
  CLIENT_0005("Can't get user input"),
40
  CLIENT_0005("Can't get user input"),
41

    
   
41

   
42
  /** There occurred exception on server side **/
42
  /** There occurred exception on server side **/
43
  CLIENT_0006("Server has returned exception"),
43
  CLIENT_0006("Server has returned exception"),
44

    
   
44

   

    
   
45
  /** Command not compatible with batch mode */

    
   
46
  CLIENT_0007("Command not compatible with batch mode"),

    
   
47

   
45
  ;
48
  ;
46

    
   
49

   
47
  private final String message;
50
  private final String message;
48

    
   
51

   
49
  private ClientError(String message) {
52
  private ClientError(String message) {
[+20] [20] 11 lines
client/src/main/java/org/apache/sqoop/client/core/Environment.java
Revision c9e4e2a5bea8642cfe705d0771a06ab536cbf463 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java
Revision a127d61661113ef0ede865b20d20adcf65dc3af1 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java
Revision 6cd2ff5e3e2f77f4f1e34d058cf5b3720bb7887c New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SqoopShell.java
Revision 9fb5f036a5ba7c76d0f948af08ac6f3c144ffc77 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/UpdateCommand.java
Revision fcf8862f23fb8cad276a6c74278db515b0604d70 New Change
 
  1. client/src/main/java/org/apache/sqoop/client/core/ClientError.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/core/Environment.java: Loading...
  3. client/src/main/java/org/apache/sqoop/client/shell/CloneCommand.java: Loading...
  4. client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java: Loading...
  5. client/src/main/java/org/apache/sqoop/client/shell/SqoopShell.java: Loading...
  6. client/src/main/java/org/apache/sqoop/client/shell/UpdateCommand.java: Loading...