Sqoop
  1. Sqoop
  2. SQOOP-1048

Sqoop2: NPE when importing NULL value

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.99.2
    • Fix Version/s: 1.99.3
    • Component/s: None
    • Labels:
      None
    • Environment:

      Mysql DB

      Description

      Throws NullPointerException when column value is NULL, since result set return null object.

      org.apache.sqoop.common.SqoopException: MAPRED_EXEC_0017:Error occurs during extractor run
      at org.apache.sqoop.job.mr.SqoopMapper.run(SqoopMapper.java:94)
      at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
      at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:396)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
      at org.apache.hadoop.mapred.Child.main(Child.java:249)
      Caused by: org.apache.sqoop.common.SqoopException: MAPRED_EXEC_0013:Cannot write to the data writer
      at org.apache.sqoop.job.mr.SqoopMapper$MapDataWriter.writeContent(SqoopMapper.java:142)
      at org.apache.sqoop.job.mr.SqoopMapper$MapDataWriter.writeArrayRecord(SqoopMapper.java:124)
      at org.apache.sqoop.connector.jdbc.GenericJdbcImportExtractor.extract(GenericJdbcImportExtractor.java:60)
      at org.apache.sqoop.connector.jdbc.GenericJdbcImportExtractor.extract(GenericJdbcImportExtractor.java:31)
      at org.apache.sqoop.job.mr.SqoopMapper.run(SqoopMapper.java:89)
      ... 7 more
      Caused by: java.lang.NullPointerException
      at org.apache.sqoop.job.io.Data.hashCode(Data.java:140)
      at org.apache.hadoop.mapreduce.lib.partition.HashPartitioner.getPartition(HashPartitioner.java:29)
      at org.apache.hadoop.mapred.MapTask$NewOutputCollector.write(MapTask.java:691)
      at org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80)
      at org.apache.sqoop.job.mr.SqoopMapper$MapDataWriter.writeContent(SqoopMapper.java:140)
      ... 11 more

      1. SQOOP-1048.patch
        2 kB
        Vasanth kumar RJ

        Activity

          People

          • Assignee:
            Vasanth kumar RJ
            Reporter:
            Vasanth kumar RJ
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development