2

Hive を使用して、DSE 3.1.3 経由でデータを Cassandra にインポートしようとしています。NULL 値の挿入は、ハイブ経由ではサポートされていないようです。これはサポートされていますか?

考案された例:

cqlsh:
create table foo(id text, name text, primary key(id));
create table fooo(id text, name text, primary key(id));

insert into foo(id,name) values('a',null);

hive: (use keyspace where foo and fooo were created)
insert into table fooo select id,null from foo;

Stack from jobtracker...

java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"id":"a","name":""}
    at org.apache.hadoop.hive.ql.exec.ExecMapper.map(ExecMapper.java:161)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:436)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:266)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
    at org.apache.hadoop.mapred.Child.main(Child.java:260)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"id":"a","name":""}
    at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:548)
    at org.apache.hadoop.hive.ql.exec.ExecMapper.map(ExecMapper.java:143)
    ... 8 more
Caused by: java.lang.NullPointerException
    at org.apache.hadoop.hive.serde2.lazy.LazyUtils.writePrimitiveUTF8(LazyUtils.java:220)
    at org.apache.hadoop.hive.cassandra.serde.AbstractTableMapping.serialize(AbstractTableMapping.java:149)
    at org.apache.hadoop.hive.cassandra.serde.AbstractTableMapping.serializeToBytes(AbstractTableMapping.java:118)
    at org.apache.hadoop.hive.cassandra.cql3.serde.CqlTableMapping.getWritable(CqlTableMapping.java:53)
    at org.apache.hadoop.hive.cassandra.serde.AbstractColumnSerDe.serialize(AbstractColumnSerDe.java:150)
4

2 に答える 2

3

この問題を修正します。null を Hive にシリアライズできない

于 2013-09-24T22:04:18.000 に答える