You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Suresh Srinivas (JIRA)" <ji...@apache.org> on 2010/04/07 00:03:33 UTC

[jira] Created: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
--------------------------------------------------------------------------------------

                 Key: HADOOP-6686
                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
             Project: Hadoop Common
          Issue Type: Improvement
         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
            Reporter: Suresh Srinivas
            Assignee: Suresh Srinivas
             Fix For: 0.22.0




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-6686:
------------------------------------

    Status: Open  (was: Patch Available)

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854217#action_12854217 ] 

Suresh Srinivas commented on HADOOP-6686:
-----------------------------------------

RPC server sends exception class name and printed stack trace in response. Proposed change:

# if the exception is unwrapped, with the message set to the first line of printed stack trace from response. The message is "<Server exception class name>: <server exception message>"
#* While unwrapping, I propose removing the redundant "<exception class name>: " from the message. Other than HDFSCli test I cannot think of a reason why an application depends on the error string to include exception name, especially given that the exception type that is thrown has that information already.
#. if the exception is not unwrapped, RemoteException is thrown as it is, with printed stack trace as the message.
#* This behavior will be retained. The exception name here along with the stack trace (albeit the server side) is useful for debugging.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-6686:
------------------------------------

    Attachment: HADOOP-6686.1.patch

Updated patch:
# RemoteException message is server side stack trace minus redundant exception name prefix.
# Unwrapped exceptions from remote exception has same message as RemoteException, instead of picking only the first line from the server stack trace. The unwrapped message is same as that of RemoteException message.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854721#action_12854721 ] 

Suresh Srinivas commented on HADOOP-6686:
-----------------------------------------

With the change RemoteException has stack trace as exception message without the exception name. However unwrapped exceptions have only the first line from the stack trace without the exception name. Should we  change the unwrapped exception to also include the stack trace? I think it will will be good for debugging.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854281#action_12854281 ] 

Doug Cutting commented on HADOOP-6686:
--------------------------------------

This is definitely an improvement, but I wonder if it might be better yet if RemoteException didn't include the exception name in its message.  It might include it in toString(), as is standard, but not in getMessage().  RemoteException has a field named "className" that already stores the remote exception name.  It also redundantly includes the exception name in the exceptions message, since that's created from the value of Throwable#printStackTrace().  Rather RemoteException might parseout just the message (the first line, after the class name) and use that as its message and separately store the remote stack trace in a field, like the class name.  Then, even if the exception is not unwrapped, its message and toString() would still match that of the original exception.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-6686:
------------------------------------

    Status: Patch Available  (was: Open)

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860159#action_12860159 ] 

Hadoop QA commented on HADOOP-6686:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12441321/HADOOP-6686.1.patch
  against trunk revision 937093.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/474/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/474/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/474/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/474/console

This message is automatically generated.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-6686:
------------------------------------

    Status: Patch Available  (was: Open)

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854603#action_12854603 ] 

Suresh Srinivas commented on HADOOP-6686:
-----------------------------------------

After running a quick test, looks like in Throwable#printStackTrace(), the first line printed is Throwable#toString(). This means the change you suggested can be made without losing the wrapped exception info, if we add toString() to RemoteException to print wrapped exception name.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856137#action_12856137 ] 

Doug Cutting commented on HADOOP-6686:
--------------------------------------

+1 This looks good to me.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-6686:
------------------------------------

          Status: Resolved  (was: Patch Available)
    Hadoop Flags: [Incompatible change, Reviewed]
    Release Note: The exceptions thrown by the RPC client no longer carries a redundant exception class name in exception message. 
      Resolution: Fixed

Tests are not included in this patch, since it is covered in HDFS-1083. I committed this patch.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854647#action_12854647 ] 

Doug Cutting commented on HADOOP-6686:
--------------------------------------

> add toString() to RemoteException to print wrapped exception name

+1 I think that's a good approach.


> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854596#action_12854596 ] 

Suresh Srinivas commented on HADOOP-6686:
-----------------------------------------

The problem with that approach is, if stack trace is printed for RemoteException (not sure if any does toString() for the exception), then the exception name printed will be RemoteException. The wrapped exception name is lost!

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-6686:
------------------------------------

    Attachment: HADOOP-6686.patch

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6686) Remove redundant exception class name in unwrapped exceptions thrown at the RPC client

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856164#action_12856164 ] 

Suresh Srinivas commented on HADOOP-6686:
-----------------------------------------

Doug, could you please review and +1 HDFS-1083 as well. Committing both these changes together will keep the window for which HDFS test fails small.

> Remove redundant exception class name in unwrapped exceptions thrown at the RPC client
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6686
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6686
>             Project: Hadoop Common
>          Issue Type: Improvement
>         Environment: At RPC client, when the exception thrown by the server is unwrapped, the exception message includes redundant exception class name. This redundant information should be removed.
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6686.1.patch, HADOOP-6686.patch
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira