以下のクエリを 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;