Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-404

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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

        Activity

        steve_l created issue -
        Hide
        steve_l added a comment -

        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?

        Show
        steve_l added a comment - 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?
        Owen O'Malley made changes -
        Field Original Value New Value
        Project Hadoop Common [ 12310240 ] Hadoop Map/Reduce [ 12310941 ]
        Key HADOOP-4263 MAPREDUCE-404
        Component/s mapred [ 12310690 ]
        Gavin made changes -
        Reporter Steve Loughran [ steve_l ] Steve Loughran [ stevel@apache.org ]
        Hide
        Allen Wittenauer added a comment -

        Probably not.

        Closing as stale.

        Show
        Allen Wittenauer added a comment - Probably not. Closing as stale.
        Allen Wittenauer made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not a Problem [ 8 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development