配置单元创建表忽略 protobuf 中的'bytes'类型



我正在使用我用来创建表的Protobuf问题。

i有一个.proto文件,其中有2个字段。Hive似乎只使用1个字段(emetadata),而忽略了表中的"字节"类型字段。

message EE {
 required EMetaData header = 1;
 optional bytes cl = 2;
}
message EMetaData {
 required uint32 version = 1;
 optional string root_pid = 2;
}

在Hive中像这样创建了表。

Hive>desc pbtest2;
OK
key     struct<header:struct<rootpid:string,version:int>>  from deserializer
value   struct<header:struct<rootpid:string,version:int>>  from deserializer

下面是我的创建表语句。

create table pbtest2 row format serde 'MyProtobufDeserializer' with serdeproperties ('KEY_SERIALIZE_CLASS'='CEMessages$EE','VALUE_SERIALIZE_CLASS'='CEMessages$EE') stored as inputformat 'MyInputFormat' outputformat 'org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'

表中不存在字节类型Cl字段。不确定是什么问题。有人遇到这个问题吗?如果您有任何建议,请告诉我。

弄清楚我的Serde需要一些更改。它没有从.proto文件处理"字节"类型。处理后,我可以看到为表创建的"二进制"类型字段。

最新更新