You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Dian Fu <di...@gmail.com> on 2015/12/31 03:23:19 UTC

Review Request 41824: Sqoop2: Client is not exposing the real exception when retrieving exception from server

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41824/
-----------------------------------------------------------

Review request for Sqoop.


Bugs: SQOOP-2765
    https://issues.apache.org/jira/browse/SQOOP-2765


Repository: sqoop-sqoop2


Description
-------

It would be great to display the original exception description without the verbose mode.


Diffs
-----

  common/src/main/java/org/apache/sqoop/error/code/ServerError.java PRE-CREATION 
  server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java 1ed63e4 
  server/src/main/java/org/apache/sqoop/handler/DriverRequestHandler.java 95a3291 
  server/src/main/java/org/apache/sqoop/handler/HandlerUtils.java 85383af 
  server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java 7fa6a3b 
  server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java 5b1258f 
  server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java 6cf3dbe 
  server/src/main/java/org/apache/sqoop/handler/VersionRequestHandler.java 30819bc 
  server/src/main/java/org/apache/sqoop/server/RequestContext.java 2beac2b 
  server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java fb4a99f 
  server/src/main/java/org/apache/sqoop/server/common/ServerError.java 1b021cf 
  shell/src/main/java/org/apache/sqoop/shell/utils/ThrowableDisplayer.java b9c8cad 

Diff: https://reviews.apache.org/r/41824/diff/


Testing
-------


Thanks,

Dian Fu


Re: Review Request 41824: Sqoop2: Client is not exposing the real exception when retrieving exception from server

Posted by Dian Fu <di...@gmail.com>.

> On Dec. 31, 2015, 1:50 p.m., Jarek Cecho wrote:
> > I don't think that moving exception classees to common module is the right thing to do - this is only partial solution that will never work fully correctly. We have bunch of pluggable pieces (mainly connectors) can can be shipped outside of Sqoop and hence we can't assume that we know all the error codes. I know that we have bunch of error codes right now in common module, but they do not belong there and we have a ticket to fix that - SQOOP-2247.
> > 
> > Thinking about different approach - We can perhaps create new exception class on client side that will be able to wrap any un-known SqoopException? The class would get the code and message from server as a strings and hence we would avoid the need to have the "Enum" on client side. What do you think?

Good idea!!! I will update the patch accordingly.


- Dian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41824/#review112388
-----------------------------------------------------------


On Dec. 31, 2015, 2:23 a.m., Dian Fu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41824/
> -----------------------------------------------------------
> 
> (Updated Dec. 31, 2015, 2:23 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-2765
>     https://issues.apache.org/jira/browse/SQOOP-2765
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> It would be great to display the original exception description without the verbose mode.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/sqoop/error/code/ServerError.java PRE-CREATION 
>   server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java 1ed63e4 
>   server/src/main/java/org/apache/sqoop/handler/DriverRequestHandler.java 95a3291 
>   server/src/main/java/org/apache/sqoop/handler/HandlerUtils.java 85383af 
>   server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java 7fa6a3b 
>   server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java 5b1258f 
>   server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java 6cf3dbe 
>   server/src/main/java/org/apache/sqoop/handler/VersionRequestHandler.java 30819bc 
>   server/src/main/java/org/apache/sqoop/server/RequestContext.java 2beac2b 
>   server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java fb4a99f 
>   server/src/main/java/org/apache/sqoop/server/common/ServerError.java 1b021cf 
>   shell/src/main/java/org/apache/sqoop/shell/utils/ThrowableDisplayer.java b9c8cad 
> 
> Diff: https://reviews.apache.org/r/41824/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dian Fu
> 
>


Re: Review Request 41824: Sqoop2: Client is not exposing the real exception when retrieving exception from server

Posted by Jarek Cecho <ja...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41824/#review112388
-----------------------------------------------------------


I don't think that moving exception classees to common module is the right thing to do - this is only partial solution that will never work fully correctly. We have bunch of pluggable pieces (mainly connectors) can can be shipped outside of Sqoop and hence we can't assume that we know all the error codes. I know that we have bunch of error codes right now in common module, but they do not belong there and we have a ticket to fix that - SQOOP-2247.

Thinking about different approach - We can perhaps create new exception class on client side that will be able to wrap any un-known SqoopException? The class would get the code and message from server as a strings and hence we would avoid the need to have the "Enum" on client side. What do you think?

- Jarek Cecho


On Dec. 31, 2015, 2:23 a.m., Dian Fu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41824/
> -----------------------------------------------------------
> 
> (Updated Dec. 31, 2015, 2:23 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-2765
>     https://issues.apache.org/jira/browse/SQOOP-2765
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> It would be great to display the original exception description without the verbose mode.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/sqoop/error/code/ServerError.java PRE-CREATION 
>   server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java 1ed63e4 
>   server/src/main/java/org/apache/sqoop/handler/DriverRequestHandler.java 95a3291 
>   server/src/main/java/org/apache/sqoop/handler/HandlerUtils.java 85383af 
>   server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java 7fa6a3b 
>   server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java 5b1258f 
>   server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java 6cf3dbe 
>   server/src/main/java/org/apache/sqoop/handler/VersionRequestHandler.java 30819bc 
>   server/src/main/java/org/apache/sqoop/server/RequestContext.java 2beac2b 
>   server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java fb4a99f 
>   server/src/main/java/org/apache/sqoop/server/common/ServerError.java 1b021cf 
>   shell/src/main/java/org/apache/sqoop/shell/utils/ThrowableDisplayer.java b9c8cad 
> 
> Diff: https://reviews.apache.org/r/41824/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dian Fu
> 
>


Re: Review Request 41824: Sqoop2: Client is not exposing the real exception when retrieving exception from server

Posted by Jarek Cecho <ja...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41824/#review112575
-----------------------------------------------------------

Ship it!


Ship It!

- Jarek Cecho


On Jan. 4, 2016, 7:19 a.m., Dian Fu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41824/
> -----------------------------------------------------------
> 
> (Updated Jan. 4, 2016, 7:19 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-2765
>     https://issues.apache.org/jira/browse/SQOOP-2765
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> It would be great to display the original exception description without the verbose mode.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/sqoop/error/code/SqoopError.java PRE-CREATION 
>   common/src/main/java/org/apache/sqoop/json/ThrowableBean.java 7748247 
>   common/src/test/java/org/apache/sqoop/json/TestThrowableBean.java e557519 
>   shell/src/main/java/org/apache/sqoop/shell/utils/ThrowableDisplayer.java b9c8cad 
> 
> Diff: https://reviews.apache.org/r/41824/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dian Fu
> 
>


Re: Review Request 41824: Sqoop2: Client is not exposing the real exception when retrieving exception from server

Posted by Dian Fu <di...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41824/
-----------------------------------------------------------

(Updated Jan. 4, 2016, 7:19 a.m.)


Review request for Sqoop.


Bugs: SQOOP-2765
    https://issues.apache.org/jira/browse/SQOOP-2765


Repository: sqoop-sqoop2


Description
-------

It would be great to display the original exception description without the verbose mode.


Diffs (updated)
-----

  common/src/main/java/org/apache/sqoop/error/code/SqoopError.java PRE-CREATION 
  common/src/main/java/org/apache/sqoop/json/ThrowableBean.java 7748247 
  common/src/test/java/org/apache/sqoop/json/TestThrowableBean.java e557519 
  shell/src/main/java/org/apache/sqoop/shell/utils/ThrowableDisplayer.java b9c8cad 

Diff: https://reviews.apache.org/r/41824/diff/


Testing
-------


Thanks,

Dian Fu