簡體   English   中英

在按需 hdinsight 集群中的 hive 腳本中使用 JsonSerDe

[英]Using JsonSerDe in a hive script in an on-demand hdinsight cluster

我編寫了一個 hive 腳本,該腳本在現有的 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 文件加載到 hive 表中。 在我現有的集群中,class 存在,無需任何額外配置。 是否有必要為按需集群明確指定 JsonSerDe JAR 文件,如果是這樣,這怎么可能?

當您缺少 Jar 文件時,您將收到此錯誤消息。

您可以在 ADF Hive 活動中添加 Jar 文件,如圖所示。

Go 到活動 => 文件路徑 => 瀏覽本地並添加 Jar 文件。

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM