Issue Details (XML | Word | Printable)

Key: HADOOP-4262
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Steve Loughran
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

message generated when the client exception has a null message is not useful

Created: 24/Sep/08 01:02 PM   Updated: 23/Apr/09 07:17 PM
Return to search
Component/s: ipc
Affects Version/s: 0.19.0, 0.20.0
Fix Version/s: 0.20.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HADOOP-4262.patch 2008-09-24 05:26 PM Doug Cutting 0.6 kB
Text File Licensed for inclusion in ASF works hadoop-4262.patch 2008-09-24 02:58 PM Steve Loughran 0.7 kB

Hadoop Flags: Reviewed
Resolution Date: 29/Sep/08 09:43 PM


 Description  « Hide
This was created by HADOOP-3844; if the exception doesn't have a meaningful message, the output isn't that informative :
java.io.IOException: Call to localhost/127.0.0.1:8012 failed on local exception: null

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Steve Loughran added a comment - 24/Sep/08 01:03 PM
fuller stack trace: [sf-startdaemon-debug] Caused by: java.io.IOException: Call to localhost/127.0.0.1:8012 failed on local exception: null
[sf-startdaemon-debug] at org.apache.hadoop.ipc.Client.call(Client.java:699)
[sf-startdaemon-debug] at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:216)
[sf-startdaemon-debug] at org.apache.hadoop.mapred.$Proxy6.getJobProfile(Unknown Source)
[sf-startdaemon-debug] at org.apache.hadoop.mapred.JobClient$NetworkedJob.<init>(JobClient.java:179)
[sf-startdaemon-debug] at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:828)
[sf-startdaemon-debug] at org.smartfrog.services.hadoop.components.submitter.SubmitterImpl.sfStart(SubmitterImpl.java:104)
[sf-startdaemon-debug] ... 11 more
[sf-startdaemon-debug] Caused by: java.io.EOFException
[sf-startdaemon-debug] at java.io.DataInputStream.readInt(DataInputStream.java:375)
[sf-startdaemon-debug] at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:493)
[sf-startdaemon-debug] at org.apache.hadoop.ipc.Client$Connection.run(Client.java:438)

I propose that if the getMessage() value is null, then instead the classname of the excepetion is picked up instead. So the expected text would be

Caused by: java.io.IOException: Call to localhost/127.0.0.1:8012 failed on local exception: java.io.EOFException


Steve Loughran added a comment - 24/Sep/08 03:01 PM
This patch changes the failure message to be the classname if there is no message in the exception itself:
[sf-startdaemon-debug] Caused by: java.io.IOException: Call to localhost/127.0.0.1:8012 failed on local exception: java.io.EOFException
[sf-startdaemon-debug] at org.apache.hadoop.ipc.Client.call(Client.java:699)
[sf-startdaemon-debug] at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:216)
[sf-startdaemon-debug] at org.apache.hadoop.mapred.$Proxy6.getJobProfile(Unknown Source)
[sf-startdaemon-debug] 08/09/24 15:43:13 [IPC Server handler 6 on 8012] INFO ipc.Server : IPC Server handler 6 on 8012: exiting
[sf-startdaemon-debug] 08/09/24 15:43:13 [IPC Server handler 1 on 8012] INFO ipc.Server : IPC Server handler 1 on 8012: exiting
[sf-startdaemon-debug] 08/09/24 15:43:13 [IPC Server handler 0 on 8012] INFO ipc.Server : IPC Server handler 0 on 8012: exiting
[sf-startdaemon-debug] at org.apache.hadoop.mapred.JobClient$NetworkedJob.<init>(JobClient.java:179)
[sf-startdaemon-debug] at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:828)
[sf-startdaemon-debug] at org.smartfrog.services.hadoop.components.submitter.SubmitterImpl.sfStart(SubmitterImpl.java:104)
[sf-startdaemon-debug] ... 11 more
[sf-startdaemon-debug] Caused by: java.io.EOFException
[sf-startdaemon-debug] at java.io.DataInputStream.readInt(DataInputStream.java:375)
[sf-startdaemon-debug] at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:493)
[sf-startdaemon-debug] at org.apache.hadoop.ipc.Client$Connection.run(Client.java:438)

There's no test. It may make sense to extract this exception-to-text operation into a utils class where it could be reused and tested trivially.


Doug Cutting added a comment - 24/Sep/08 05:25 PM
> It may make sense to extract this exception-to-text operation into a utils class

I think instead we should just use Throwable#toString().

http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html#toString()


Doug Cutting added a comment - 24/Sep/08 05:26 PM
Here's a new version that uses Throwable#toString().

Hadoop QA added a comment - 24/Sep/08 08:53 PM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12390850/HADOOP-4262.patch
against trunk revision 698677.

+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 tests are needed for 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 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/3363/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3363/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3363/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3363/console

This message is automatically generated.


Owen O'Malley added a comment - 29/Sep/08 09:43 PM
I just committed this. Thanks, Steve!

Hudson added a comment - 01/Oct/08 01:29 PM
Integrated in Hadoop-trunk #620 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/620/)
. Generate better error message when client exception has null
message. (stevel via omalley)