|
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. > 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( Here's a new version that uses Throwable#toString().
-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. +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/ This message is automatically generated. I just committed this. Thanks, Steve!
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) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[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