gpt4 book ai didi

hadoop - Hive-> Kafka:插入Hive Kafka集成外部表失败

转载 作者:行者123 更新时间:2023-12-02 20:17:42 26 4
gpt4 key购买 nike

#Exception I got:
Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.io.ParquetHiveRecord cannot be cast to org.apache.hadoop.hive.kafka.KafkaWritable

#create non-native external hive table
CREATE EXTERNAL TABLE IF NOT EXISTS weatherHive(lng DOUBLE, lat DOUBLE, avg_tmpr_f DOUBLE, avg_tmpr_c DOUBLE, wthr_date STRING) PARTITIONED BY (year INT, month INT, day INT) TBLPROPERTIES ('kafka.topic' = 'weatherHive', 'kafka.bootstrap.servers'='sandbox-hdp:6667', "kafka.serde.class"="org.apache.hadoop.hive.serde2.avro.AvroSerDe" );
#insert test data
INSERT INTO TABLE weatherHive VALUES (-111,22,80,23,'2016-10-01',2020, 10 ,1 );

然后我得到一个异常(exception),我该怎么办,我需要对处理程序jar做些什么?
我加载到 hive 中:
add add jar hdfs://sandbox-hdp.hortonworks.com:8020/sandbox/jars/kafka-handler-3.1.2000.7.0.3.0-79.jar;

最佳答案

您可能缺少类“org.apache.hadoop.hive.kafka.KafkaSerDe”。 checkout this answer

关于hadoop - Hive-> Kafka:插入Hive Kafka集成外部表失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62424722/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com