簡體   English   中英

使用 Oozie 通過 Hive 執行查詢時,如何解決“只能使用 kerberos 或 Web 身份驗證頒發委托令牌”的問題?

[英]How to fix “Delegation Token can be issued only with kerberos or web authentication” when executing query over Hive using Oozie?

當我嘗試編寫通過在 oozie 中使用 hive 上下文查詢 hive 獲得的數據幀時,出現以下異常。 可能是什么問題

Caused by: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: execute, tree:
TungstenExchange hashpartitioning
at org.apache.spark.sql.catalyst.errors.package$.attachTree(package.scala:49)
    at org.apache.spark.sql.execution.Exchange.doExecute(Exchange.scala:247)
    at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:132)
    at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:130)
    at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
    at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:130)

Caused by: org.apache.hadoop.ipc.RemoteException(java.io.IOException): Delegation Token can be issued only with kerberos or web authentication
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getDelegationToken(FSNamesystem.java:7496)
    at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getDelegationToken(NameNodeRpcServer.java:548)
    at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.getDelegationToken(AuthorizationProviderProxyClientProtocol.java:663)
    at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getDelegationToken(ClientNamenodeProtocolServerSideTranslatorPB.java:981)

這是因為 Oozie 在啟動 Spark 操作之前已經獲得了委托令牌。

解決方案是通過在workflow.xml中的spark action中添加以下內容來要求Spark不要再次獲取Delegation令牌:

<spark-opts>--conf spark.yarn.security.tokens.hive.enabled=false</spark-opts>

上面的分析是正確的,但是該解決方案對我不起作用。 相反,也可以告訴 spark 忽略 oozie 已經請求的令牌,這對我來說是這樣的:

--conf spark.yarn.security.tokens.hadoopfs.enabled=false
--conf spark.yarn.security.credentials.hadoopfs.enabled=false

暫無
暫無

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

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