From f95cb04e4009f25f6b466173fcab24bd861acb24 Mon Sep 17 00:00:00 2001
From: tgravescs <tgraves_cs@yahoo.com>
Date: Fri, 8 Nov 2013 10:07:15 -0600
Subject: [PATCH] Remove the runAsUser as it breaks secure hdfs access

---
 core/src/main/scala/org/apache/spark/executor/Executor.scala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/src/main/scala/org/apache/spark/executor/Executor.scala b/core/src/main/scala/org/apache/spark/executor/Executor.scala
index 5c9bb9db1c..0a4f10c940 100644
--- a/core/src/main/scala/org/apache/spark/executor/Executor.scala
+++ b/core/src/main/scala/org/apache/spark/executor/Executor.scala
@@ -179,7 +179,10 @@ private[spark] class Executor(
       }
     }
 
-    override def run(): Unit = SparkHadoopUtil.get.runAsUser(sparkUser) { () =>
+    // the runAsUser breaks secure HDFS access. It needs to add the credentials
+    // for the user if running as a user. Comment out for now. 
+    //override def run(): Unit = SparkHadoopUtil.get.runAsUser(sparkUser) { () =>
+    override def run(): Unit = {
       val startTime = System.currentTimeMillis()
       SparkEnv.set(env)
       Thread.currentThread.setContextClassLoader(replClassLoader)
-- 
GitLab