[ https://issues.apache.org/jira/browse/HIVE-11380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14649298#comment-14649298 ]
Sergio Peña commented on HIVE-11380: ------------------------------------ +1 The patch is simple. Thanks [~ychena] > NPE when FileSinkOperator is not initialized > -------------------------------------------- > > Key: HIVE-11380 > URL: https://issues.apache.org/jira/browse/HIVE-11380 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.14.0 > Reporter: Yongzhi Chen > Assignee: Yongzhi Chen > Attachments: HIVE-11380.1.patch > > > When FileSinkOperator's initializeOp is not called (which may happen when an > operator before FileSinkOperator initializeOp failed), FileSinkOperator will > throw NPE at close time. The stacktrace: > {noformat} > org.apache.hadoop.hive.ql.metadata.HiveException: > java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.exec.FileSinkOperator.createBucketFiles(FileSinkOperator.java:523) > at > org.apache.hadoop.hive.ql.exec.FileSinkOperator.closeOp(FileSinkOperator.java:952) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:598) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:610) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:610) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:610) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:610) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:610) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:610) > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:199) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:61) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) > at > org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.exec.FileSinkOperator.createBucketFiles(FileSinkOperator.java:519) > ... 18 more > {noformat} > This Exception is misleading and often distracts users from finding real > issues. -- This message was sent by Atlassian JIRA (v6.3.4#6332)