You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Jie Zhang <ji...@gmail.com> on 2015/04/28 02:01:11 UTC

NPE error during file sink stage when inserting into bucketed table

Hi,

I have created a simple bucketed table and would like to insert some values
into the table. However, hit the following NPE during file sink. Any clue
what the problem can be? I am using hive 0.14.0, with
hive.enforce.bucketing setting true. Thanks very much for any help!

create table test4 (id string, source string) clustered by (id) into 16
buckets;

insert into table test4 select id, source from test;

Diagnostic Messages for this Task:

Error: java.lang.RuntimeException:
org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while
processing row (tag=0) {"key":{},"value":{"_col0":"1","_col1":"aos"}}

at
org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:265)

at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:462)

at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408)

at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:415)

at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)

at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157)

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime
Error while processing row (tag=0)
{"key":{},"value":{"_col0":"1","_col1":"aos"}}

at
org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:253)

... 7 more

Caused by: java.lang.NullPointerException

at
org.apache.hadoop.hive.ql.exec.FileSinkOperator.findWriterOffset(FileSinkOperator.java:755)

at
org.apache.hadoop.hive.ql.exec.FileSinkOperator.processOp(FileSinkOperator.java:683)

at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815)

at
org.apache.hadoop.hive.ql.exec.ExtractOperator.processOp(ExtractOperator.java:45)

at
org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:244)

... 7 more

FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.mr.MapRedTask


Jessica