我能够从HIVE提示符中成功执行以下查询。
SELECT * FROM DB1.TABLE1;
但每当我尝试执行以下任何其他查询时:
SELECT COL1 FROM DB1.TABLE1 WHERE PARTITION_COL = 201211;
java.io.IOException: java.io.IOException: java.lang.NullPointerException
at org.apache.hadoop.hive.io.HiveIOExceptionHandlerChain.handleRecordReaderNextException(HiveIOExceptionHandlerChain.java:121)
at org.apache.hadoop.hive.io.HiveIOExceptionHandlerUtil.handleRecordReaderNextException(HiveIOExceptionHandlerUtil.java:77)
at org.apache.hadoop.hive.shims.HadoopShimsSecure$CombineFileRecordReader.doNextWithExceptionHandler(HadoopShimsSecure.java:304)
at org.apache.hadoop.hive.shims.HadoopShimsSecure$CombineFileRecordReader.next(HadoopShimsSecure.java:220)
at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.moveToNext(MapTask.java:234)
at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.next(MapTask.java:214)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:48)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:434)
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(AccessController.java:366)
at javax.security.auth.Subject.doAs(Subject.java:572)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1502)
at org.apache.hadoop.mapred.Child.main(Child.java:249)
Caused by: java.io.IOException: java.lang.NullPointerException
at org.apache.hadoop.hive.io.HiveIOExceptionHandlerChain.handleRecordReaderNextException(HiveIOExceptionHandlerChain.java:121)
at org.apache.hadoop.hive.io.HiveIOExceptionHandlerUtil.handleRecordReaderNextException(HiveIOExceptionHandlerUtil.java:77)
at org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader.doNext(HiveContextAwareRecordReader.java:344)
at org.apache.hadoop.hive.ql.io.CombineHiveRecordReader.doNext(CombineHiveRecordReader.java:101)
at org.apache.hadoop.hive.ql.io.CombineHiveRecordReader.doNext(CombineHiveRecordReader.java:41)
at org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader.next(HiveContextAwareRecordReader.java:122)
at org.apache.hadoop.hive.shims.HadoopShimsSecure$CombineFileRecordReader.doNextWithExceptionHandler(HadoopShimsSecure.java:302)
... 11 more
Caused by: java.lang.NullPointerException
at parquet.hive.MapredParquetInputFormat$RecordReaderWrapper.next(MapredParquetInputFormat.java:303)
at parquet.hive.MapredParquetInputFormat$RecordReaderWrapper.next(MapredParquetInputFormat.java:199)
at org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader.doNext(HiveContextAwareRecordReader.java:339)
... 15 more
使用以下DDL语句在IBM BigSQL环境中创建表。
CREATE HADOOP TABLE DB1.TABLE1
(
COL1 BIGINT NOT NULL,
COL2 INTEGER NOT NULL,
COL3 INTEGER NOT NULL,
COL4 VARCHAR(12096),
COL5 VARCHAR(12096),
COL6 VARCHAR(510),
COL7 VARCHAR(510),
COL8 VARCHAR(6048),
COL9 VARCHAR(32)
)
PARTITIONED BY (PARTITION_COL INTEGER)
STORED AS PARQUETFILE;