在按需hdinsight群集中的配置单元脚本中使用JsonSerDe

问题描述 投票:0回答:1

我已经编写了一个在现有HDInsight群集中运行良好的配置单元脚本。但是,当我通过按需群集中的Azure数据工厂实例化脚本时,出现以下错误:

Caused by: java.lang.ClassNotFoundException: Class org.apache.hive.hcatalog.data.JsonSerDe not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2214)
at org.apache.hadoop.hive.ql.plan.PartitionDesc.getDeserializer(PartitionDesc.java:143)
at org.apache.hadoop.hive.ql.exec.MapOperator.getConvertedOI(MapOperator.java:316)
... 19 more

我使用JsonSerDe将数据从JSON文件加载到配置单元表中。在我现有的群集中,无需任何其他配置即可显示该类。是否有必要为按需集群明确指定JsonSerDe JAR文件,如果可以,这怎么可能?

azure hive user-defined-functions hdinsight
1个回答
0
投票

缺少Jar文件时,您将收到此错误消息。

您可以如图所示将Jar文件添加到ADF Hive活动中。

转到活动=>文件路径=>浏览本地并添加Jar文件。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.