[
https://issues.apache.org/jira/browse/HADOOP-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625569#action_12625569
]
Sanjay Radia commented on HADOOP-4009:
--------------------------------------
Here are two possible solutions that can be implemented in the RPC layer.
1) if the client side has the class of the wrapped exception then rethrow it
Unfortunately, this may endup throwing exceptions not declared in the
signature.
2) if the client side has the class of the wrapped exception and it is a
declared exception then rethrow it.
One must rethrow the *deepest* declared exception (since a method could
declare multiple exceptions that are
a subclass of one of the declared exception.)
Q. suppose method foo() is declared as: foo() throws A, Ab, Ac;
and Ab and Ac are subclasses of A.
Say the server throws Az which is a subclass of A (note Az is not declared
in foo's signature).
Should the client side rethrow Az or A assuming that the class for Az is
available?
> Declare HDFS exceptions in the HDFS interface and also in class FileSystem
> and rethrow the encapsulated exception
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-4009
> URL: https://issues.apache.org/jira/browse/HADOOP-4009
> Project: Hadoop Core
> Issue Type: Sub-task
> Reporter: Sanjay Radia
>
> Server-side exceptions are encapsulated in the remote exception (as the
> class name and the error string ).
> The client side and FileSystem does not declare or thrown the these
> encapsulated exception.
> Work Items
> * Declare the exceptions in FileSystem and the HDFS interface (but still as
> subclasses of IOException)
> * Rethrow encapsulated declared exceptions if they are the declared
> exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.