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

Search Discussions

  • Konstantin Shvachko (JIRA) at Aug 23, 2008 at 12:19 am
    [ https://issues.apache.org/jira/browse/HADOOP-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625005#action_12625005 ]

    Konstantin Shvachko commented on HADOOP-4009:
    ---------------------------------------------

    Re-throwing should be rather easy since we have {{unwrapRemoteException()}}.
    But catching and analyzing the "real" exceptions instead of {{RemoteException}} as we do now will involve a lot of code changes.
    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.
  • Steve Loughran (JIRA) at Aug 24, 2008 at 6:12 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625207#action_12625207 ]

    Steve Loughran commented on HADOOP-4009:
    ----------------------------------------

    -you could search the code for the string "catch(RemoteException" and see what comes up. One of the real risks here is that its the failure mode code that is being changed, and that's always the code that doesn't get enough coverage, enough testing and enough real-world use, because its not until things start to go wrong in interesting ways that the code gets followed. Which makes it harder to say "we've fixed everything" once this change (Which seems good, BTW).

    One possibility: make the HDFS exception a subclass of RemoteException, with all the existing semantics. Old code may still work.
    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.
  • Sanjay Radia (JIRA) at Aug 26, 2008 at 1:04 am
    [ 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.
  • Tsz Wo (Nicholas), SZE (JIRA) at Aug 26, 2008 at 1:22 am
    [ https://issues.apache.org/jira/browse/HADOOP-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625576#action_12625576 ]

    Tsz Wo (Nicholas), SZE commented on HADOOP-4009:
    ------------------------------------------------
    Unfortunately, this may endup throwing exceptions not declared in the signature.
    It is not possible since the program won't be compiled.
    One must rethrow the deepest declared exception
    Should it rethrow the *original/wrapped* exception? In the example "foo() throws A, Ab, Ac", if server throws Abb which is a subclass of Ab. I think we should throw Abb but not Ab.
    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.
  • Robert Chansler (JIRA) at Sep 10, 2008 at 10:35 pm
    [ https://issues.apache.org/jira/browse/HADOOP-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Robert Chansler updated HADOOP-4009:
    ------------------------------------

    Component/s: dfs
    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
    Components: dfs
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedAug 23, '08 at 12:01a
activeSep 10, '08 at 10:35p
posts6
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Robert Chansler (JIRA): 6 posts

People

Translate

site design / logo © 2022 Grokbase