[ 
https://issues.apache.org/jira/browse/HIVE-15767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16103843#comment-16103843
 ] 

Peter Cseh commented on HIVE-15767:
-----------------------------------

The problem is that we're not setting the _proper_ 
mapreduce.job.credentials.binary, but 
[here|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/RemoteHiveSparkClient.java#L235],
 were passing every property from the HiveConf conf to the configuration for 
Spark.
If HiveCLI is called from the Oozie LauncherMapper, that HiveConf will contain 
the "mapreduce.job.credentials.binary" property for the LauncherMapper. e.g 
/yarn/nm/usercache/systest/appcache/application_1501079366372_0045/container_1501079366372_0045_01_000001/container_tokens
This property have to be there so HiveCLI can access the tokens properly.

Passing this folder to the Spark driver is problematic as the driver often will 
be executed on an other machine in the cluster where it won't be able to read 
this file as it's not there. There are a couple ways to define the location of 
the container_tokens file and Yarn takes care of Spark getting the correct 
location on the node the driver will be executed on.


> Hive On Spark is not working on secure clusters from Oozie
> ----------------------------------------------------------
>
>                 Key: HIVE-15767
>                 URL: https://issues.apache.org/jira/browse/HIVE-15767
>             Project: Hive
>          Issue Type: Bug
>          Components: Spark
>    Affects Versions: 1.2.1, 2.1.1
>            Reporter: Peter Cseh
>            Assignee: Peter Cseh
>         Attachments: HIVE-15767-001.patch, HIVE-15767-002.patch, 
> HIVE-15767.1.patch
>
>
> When a HiveAction is launched form Oozie with Hive On Spark enabled, we're 
> getting errors:
> {noformat}
> Caused by: java.io.IOException: Exception reading 
> file:/yarn/nm/usercache/yshi/appcache/application_1485271416004_0022/container_1485271416004_0022_01_000002/container_tokens
>         at 
> org.apache.hadoop.security.Credentials.readTokenStorageFile(Credentials.java:188)
>         at 
> org.apache.hadoop.mapreduce.security.TokenCache.mergeBinaryTokens(TokenCache.java:155)
> {noformat}
> This is caused by passing the {{mapreduce.job.credentials.binary}} property 
> to the Spark configuration in RemoteHiveSparkClient.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to