[ 
https://issues.apache.org/jira/browse/HDFS-12583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190754#comment-16190754
 ] 

Weiwei Yang commented on HDFS-12583:
------------------------------------

Hi [~linyiqun], [~vagarychen]

Instead of logging errors in server log, can we make sure the entire exception 
is thrown to the client side (not just short message) ? It looks like to me 
following code is swallowing the exception, e.g in 
{{VolumeProcessTemplate#handleIOException}}, 

{code}
OzoneException exp = null;
...
// this creates a new ozone exception without inheriting the stack trace from 
IOException
exp = ErrorTable
          .newError(ErrorTable.VOLUME_ALREADY_EXISTS, reqID, volume, hostName);
...
// this only sets the message
if ((fsExp != null) && (exp != null)) {
  exp.setMessage(fsExp.getMessage());
}
...
{code}

this call transfers an {{IOException}} to {{OzoneException}} but only sets the 
error message. I am thinking whenever creating an {{OzoneException}}, if we 
make sure we do pass the exception instance to its constructor, e.g

{code}
exp = ErrorTable
          .newError(ErrorTable.VOLUME_ALREADY_EXISTS, reqID, volume, hostName, 
ioe);
{code}

would that resolve this problem (client will get full stack trace about the 
original exception)? Similar code in {{BucketProcessTemplate}} and 
{{KeyProcessTemplate}}.

> Ozone: Fix swallow exceptions which makes hard to debug failures
> ----------------------------------------------------------------
>
>                 Key: HDFS-12583
>                 URL: https://issues.apache.org/jira/browse/HDFS-12583
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-12583-HDFS-7240.001.patch, 
> HDFS-12583-HDFS-7240.002.patch, HDFS-12583-HDFS-7240.003.patch
>
>
> There are some places that swallow exceptions that makes client hard to debug 
> the failure. For example, if we get xceiver client from xceiver client 
> manager error, client only gets the error info like this:
> {noformat}
> org.apache.hadoop.ozone.web.exceptions.OzoneException: Exception getting 
> XceiverClient.
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>       at 
> com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:119)
>       at 
> com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDefault(StdValueInstantiator.java:243)
> {noformat}
> The error exception stack is missing. We should print the error log as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to