Review Board 1.7.22


SQOOP-629: Provide better exception handling during server-client communication

Review Request #7624 - Created Oct. 16, 2012 and submitted

Jarek Cecho
SQOOP-629
Reviewers
Sqoop
sqoop-sqoop2
I've implemented ThrowableBean that transfers entire bean, including stack trace and all "caused by" exceptions. I've provided pretty printing functionality on the client side to have "nice output".
I've provided unit tests for new functionality and I've also tested it manually.
client/src/main/java/org/apache/sqoop/client/core/ClientError.java
Revision 1cf42e470021fc42c33c4cd4165f508bd4ec1ecf New Change
[20] 36 lines
[+20]
37
  CLIENT_0004("Unable to resolve the variables"),
37
  CLIENT_0004("Unable to resolve the variables"),
38

    
   
38

   
39
  /** We're not able to get user input */
39
  /** We're not able to get user input */
40
  CLIENT_0005("Can't get user input"),
40
  CLIENT_0005("Can't get user input"),
41

    
   
41

   
42
  /** There occured 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
  ;
45
  ;
46

    
   
46

   
47
  private final String message;
47
  private final String message;
[+20] [20] 13 lines
client/src/main/java/org/apache/sqoop/client/request/Request.java
Revision 5e381c99b72aecd07f26c1f6b8fe052c1be6a962 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/DeleteCommand.java
Revision 1ea773b06ba3ead84cbf70c7adc6be2185944483 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SqoopCommand.java
Revision c610fd47f198a082e829763988480bdfd79a67dc New Change
 
client/src/main/java/org/apache/sqoop/client/shell/SqoopShell.java
Revision d2b56ba2dca2462ca6d28d0f8c58528240ff9d78 New Change
 
client/src/main/java/org/apache/sqoop/client/utils/ThrowableDisplayer.java
New File
 
common/src/main/java/org/apache/sqoop/json/ExceptionInfo.java
Revision 68de4b1b743d94ab81664f548d8ce2ec98e8c6b1 New Change
 
common/src/main/java/org/apache/sqoop/json/ThrowableBean.java
New File
 
common/src/test/java/org/apache/sqoop/json/TestThrowableBean.java
New File
 
core/src/main/java/org/apache/sqoop/connector/ConnectorManager.java
Revision e3bf0e1dc8fafc06368cf64310ba1c4abb3015f7 New Change
 
server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java
Revision 81044ce7d8a014efac0281f79a7c97ab37ca42ae New Change
 
server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java
Revision ece3d93653831cb83dc4c517e8331e516e0624d1 New Change
 
server/src/main/java/org/apache/sqoop/server/common/ServerError.java
Revision 0a97d2d171023518abc084412ccc8c6394ea251c New Change
 
  1. client/src/main/java/org/apache/sqoop/client/core/ClientError.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/request/Request.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/SqoopCommand.java: Loading...
  5. client/src/main/java/org/apache/sqoop/client/shell/SqoopShell.java: Loading...
  6. client/src/main/java/org/apache/sqoop/client/utils/ThrowableDisplayer.java: Loading...
  7. common/src/main/java/org/apache/sqoop/json/ExceptionInfo.java: Loading...
  8. common/src/main/java/org/apache/sqoop/json/ThrowableBean.java: Loading...
  9. common/src/test/java/org/apache/sqoop/json/TestThrowableBean.java: Loading...
  10. core/src/main/java/org/apache/sqoop/connector/ConnectorManager.java: Loading...
  11. server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java: Loading...
  12. server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java: Loading...
  13. server/src/main/java/org/apache/sqoop/server/common/ServerError.java: Loading...