Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24431

Null Pointer exception while sending data to jdbc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • JDBC storage handler
    • None

    Description

      I was receiving some null pointer while writing in db:

      ERROR : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 3, vertexId=vertex_1604850281565_5081_1_02, diagnostics=[Task failed, taskId=task_1604850281565_5081_1_02_000001, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_1604850281565_5081_1_02_000001_0:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
      at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
      at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
      at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
      at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73)
      at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
      at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61)
      at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37)
      at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36)
      at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
      at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
      at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
      at org.apache.hadoop.hive.ql.exec.tez.ReduceRecordSource.pushRecord(ReduceRecordSource.java:304)
      at org.apache.hadoop.hive.ql.exec.tez.ReduceRecordProcessor.run(ReduceRecordProcessor.java:318)
      at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
      ... 16 more
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
      at org.apache.hadoop.hive.ql.exec.tez.ReduceRecordSource$GroupIterator.next(ReduceRecordSource.java:378)
      at org.apache.hadoop.hive.ql.exec.tez.ReduceRecordSource.pushRecord(ReduceRecordSource.java:294)
      ... 18 more
      Caused by: java.lang.NullPointerException
      at org.apache.hive.storage.jdbc.JdbcSerDe.serialize(JdbcSerDe.java:166)
      at org.apache.hive.storage.jdbc.JdbcSerDe.serialize(JdbcSerDe.java:59)
      at org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:961)
      at org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
      at org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
      at org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
      at org.apache.hadoop.hive.ql.exec.PTFOperator$PTFInvocation.handleOutputRows(PTFOperator.java:337)
      at org.apache.hadoop.hive.ql.exec.PTFOperator$PTFInvocation.processRow(PTFOperator.java:325)
      at org.apache.hadoop.hive.ql.exec.PTFOperator.process(PTFOperator.java:139)
      at org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
      at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
      at org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
      at org.apache.hadoop.hive.ql.exec.tez.ReduceRecordSource$GroupIterator.next(ReduceRecordSource.java:363)
      ... 19 more

      I just add a check in the patch.

      Attachments

        1. check_null.patch
          0.8 kB
          Fabien Carrion

        Activity

          People

            Unassigned Unassigned
            gkfabs Fabien Carrion
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: