diff options
author | Marcelo Vanzin <vanzin@cloudera.com> | 2016-02-29 13:01:27 -0800 |
---|---|---|
committer | Marcelo Vanzin <vanzin@cloudera.com> | 2016-02-29 13:01:27 -0800 |
commit | c7fccb56cd9260b8d72572e65f8e46a14707b9a5 (patch) | |
tree | e96053bc0d74ae33b411817268b685e995b24e7a /yarn/src/test/scala/org | |
parent | 4bd697da03079c26fd4409dc128dbff28c737701 (diff) | |
download | spark-c7fccb56cd9260b8d72572e65f8e46a14707b9a5.tar.gz spark-c7fccb56cd9260b8d72572e65f8e46a14707b9a5.tar.bz2 spark-c7fccb56cd9260b8d72572e65f8e46a14707b9a5.zip |
[SPARK-13478][YARN] Use real user when fetching delegation tokens.
The Hive client library is not smart enough to notice that the current
user is a proxy user; so when using a proxy user, it fails to fetch
delegation tokens from the metastore because of a missing kerberos
TGT for the current user.
To fix it, just run the code that fetches the delegation token as the
real logged in user.
Tested on a kerberos cluster both submitting normally and with a proxy
user; Hive and HBase tokens are retrieved correctly in both cases.
Author: Marcelo Vanzin <vanzin@cloudera.com>
Closes #11358 from vanzin/SPARK-13478.
Diffstat (limited to 'yarn/src/test/scala/org')
-rw-r--r-- | yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtilSuite.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtilSuite.scala b/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtilSuite.scala index d3acaf229c..9202bd892f 100644 --- a/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtilSuite.scala +++ b/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtilSuite.scala @@ -255,7 +255,7 @@ class YarnSparkHadoopUtilSuite extends SparkFunSuite with Matchers with Logging hadoopConf.set("hive.metastore.uris", "http://localhost:0") val util = new YarnSparkHadoopUtil assertNestedHiveException(intercept[InvocationTargetException] { - util.obtainTokenForHiveMetastoreInner(hadoopConf, "alice") + util.obtainTokenForHiveMetastoreInner(hadoopConf) }) assertNestedHiveException(intercept[InvocationTargetException] { util.obtainTokenForHiveMetastore(hadoopConf) |