You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2008/09/24 16:36:44 UTC

[jira] Created: (HADOOP-4263) NPE in text.encode when writing an invalid(?) JobProfile

NPE in text.encode when writing an invalid(?) JobProfile
--------------------------------------------------------

                 Key: HADOOP-4263
                 URL: https://issues.apache.org/jira/browse/HADOOP-4263
             Project: Hadoop Core
          Issue Type: Bug
          Components: mapred
            Reporter: Steve Loughran
            Priority: Minor


I see an NPE in one of my tests in Text.encode(String), further up the stack is  JobProfile.write(), which appears to write a null user

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


[jira] Commented: (HADOOP-4263) NPE in text.encode when writing an invalid(?) JobProfile

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634154#action_12634154 ] 

Steve Loughran commented on HADOOP-4263:
----------------------------------------

stack trace. It looks like JobProfile.user is null
08/09/24 15:28:36 [IPC Server handler 6 on 8012] INFO ipc.Server : IPC Server handler 6 on 8012 caught: java.lang.NullPointerException
at org.apache.hadoop.io.Text.encode(Text.java:388)
at org.apache.hadoop.io.Text.encode(Text.java:369)
at org.apache.hadoop.io.Text.writeString(Text.java:409)
at org.apache.hadoop.mapred.JobProfile.write(JobProfile.java:165)
at org.apache.hadoop.io.ObjectWritable.writeObject(ObjectWritable.java:159)
at org.apache.hadoop.io.ObjectWritable.write(ObjectWritable.java:70)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:903)

Given that the NPE was caught, and throwing an exception is about the only course of action, this could be viewed as working as intended. Alternatively, JobProfile could so some better validation of data and fail with something more meaningful. But is the extra performance hit (and extra test) worth the effort?

> NPE in text.encode when writing an invalid(?) JobProfile
> --------------------------------------------------------
>
>                 Key: HADOOP-4263
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4263
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Steve Loughran
>            Priority: Minor
>
> I see an NPE in one of my tests in Text.encode(String), further up the stack is  JobProfile.write(), which appears to write a null user

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