[
https://issues.apache.org/jira/browse/HDFS-11395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890867#comment-15890867
]
Jing Zhao edited comment on HDFS-11395 at 3/1/17 7:27 PM:
----------------------------------------------------------
Thanks for working on this, [~nandakumar131]. I agree we should not directly
throw a MultiException. But I have similar concern as Arpit, i.e., we should
not simply throw the first exception. I think we should
# Not mix detailed exception handling logic into
{{RequestHedgingProxyProvider}}. In {{RequestHedgingProxyProvider}}, we only
need to get the RemoteException from {{ExecutionException}}, and put all the
exceptions into {{badResults}}. No need for special handling for
StandbyException etc there. These should be handled by
{{RetryInvocationHandler#newRetryInfo}}.
# Then in {{RetryInvocationHandler#newRetryInfo}}, we should let this method
return both the RetryInfo and the exception to throw from the MultiException.
These two information should comes from the same internal exception inside of
the MultiException.
was (Author: jingzhao):
Thanks for working on this, [~nandakumar131]. I agree we should not directly
throw a MultiException. But I have similar concern as Arpit, i.e., we should
not simply throw the first exception. I think we should
# Not mix detailed exception handling logic into
{{RequestHedgingProxyProvider}}. In {{RequestHedgingProxyProvider}}, we only
need to get the RemoteException from {{ExecutionException}}, and put all the
exceptions into {{badResults}}. No need for special handling for
StandbyException etc there. These should be handled by
{{RetryInvocationHandler#newRetryInfo}}.
# Then in {{RetryInvocationHandler#newRetryInfo}}, we should let this method
return both the RetryInfo and the exception to throw from the MultiException.
These two information should comes from the same internal exception inside of
the MultiException.
> RequestHedgingProxyProvider#RequestHedgingInvocationHandler hides the
> Exception thrown from NameNode
> ----------------------------------------------------------------------------------------------------
>
> Key: HDFS-11395
> URL: https://issues.apache.org/jira/browse/HDFS-11395
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: ha
> Reporter: Nandakumar
> Assignee: Nandakumar
> Attachments: HDFS-11395.000.patch, HDFS-11395.001.patch
>
>
> When using RequestHedgingProxyProvider, in case of Exception (like
> FileNotFoundException) from ActiveNameNode,
> {{RequestHedgingProxyProvider#RequestHedgingInvocationHandler.invoke}}
> receives {{ExecutionException}} since we use {{CompletionService}} for the
> call. The ExecutionException is put into a map and wrapped with
> {{MultiException}}.
> So for a FileNotFoundException the client receives
> {{MultiException(Map(ExecutionException(InvocationTargetException(RemoteException(FileNotFoundException)))))}}
> It will cause problem in clients which are handling RemoteExceptions.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]