hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandakumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11395) RequestHedgingProxyProvider#RequestHedgingInvocationHandler hides the Exception thrown from NameNode
Date Thu, 23 Feb 2017 09:21:44 GMT

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

Nandakumar commented on HDFS-11395:

Deciding what to do when we get a MultiException should probably be handled in the RetryInvocationHandler.
The reason the short-circuit failure path looks incorrect is because it can cause spurious
request failures if the standby thinks it is active and throws something other than StandbyException.

Yeah, true. Short-circuit failure path in RequestHedgingInvocationHandler is not a proper
solution here.

I had a look at RetryInvocationHandler, MultiException is handled only while constructing
RetryInfo in RetryInvocationHandler#RetryInfo#newRetryInfo. 
In {{RetryInvocationHandler#handleException}} if {{retryInfo.fail != null}} the received exception
is thrown as it is, which in our case is MultiException(ExecutionException(RemoteException(Exception)))

As you suggested, we can unwrap ExecutionException and throw MultiException(RemoteException(Exception))
from RequestHedgingInvocationHandler.
We still have to handle MultiException in RetryInvocationHandler.

In RetryInvocationHandler, we will get list of RemoteExceptions' from MultiException, from
which we can exclude StandbyExceptions'. Is there any other check that can be performed to
identify the proper exception to throw back to client?

> 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
> 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

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

View raw message