【问题标题】:Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.apache.hadoop.hive.serde2.avro.AvroSerde执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。无法验证 serde:org.apache.hadoop.hive.serde2.avro.AvroSerde
【发布时间】:2017-01-14 06:33:05
【问题描述】:

我正在使用avro serde 创建一个配置单元表来存储 Twitter 数据。

这是代码-

create table tweets
    row format serde
    'org.apache.hadoop.hive.serde2.avro.AvroSerde'
    stored as inputformat
    'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
    outputformat
    'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
 tblproperties('avro.schema.url'='hdfs://user/itelligence/ee/TwitterDataAvroSchema.avsc');

我遇到了错误-

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. 
Cannot validate serde: org.apache.hadoop.hive.serde2.avro.AvroSerde

我已经尝试将 avsc 文件的输入作为

tblproperties('avro.schema.url'='hdfs:///user/itelligence/ee/TwitterDataAvroSchema.avsc');
tblproperties('avro.schema.url'='file://user/itelligence/schema/TwitterDataAvroSchema.avsc');

在本地和 hdfs 文件系统中,我遇到了同样的错误。

【问题讨论】:

    标签: hive avro flume-twitter hive-serde avro-tools


    【解决方案1】:

    错误消息指出 Hive 未找到 SerDe Java 类。它甚至不费心去阅读架构...

    请注意,“SerDe”有一个大写字母 D,因为它代表 Serializer-Deserializer。
    因此,只需更正您在 AvroSerDe 中的拼写错误,然后再试一次。

    【讨论】:

    • 我试过大写的 D 。但问题是 hive SerDe 类文件已损坏。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-11
    相关资源
    最近更新 更多