Github user aarondav commented on a diff in the pull request:
https://github.com/apache/spark/pull/621#discussion_r12251478
--- Diff:
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
---
@@ -94,25 +95,32 @@ private[spark] class CoarseGrainedExecutorBackend(
private[spark] object CoarseGrainedExecutorBackend {
def run(driverUrl: String, executorId: String, hostname: String, cores:
Int,
- workerUrl: Option[String]) {
- // Debug code
- Utils.checkHost(hostname)
-
- val conf = new SparkConf
- // Create a new ActorSystem to run the backend, because we can't
create a SparkEnv / Executor
- // before getting started with all our system properties, etc
- val (actorSystem, boundPort) =
AkkaUtils.createActorSystem("sparkExecutor", hostname, 0,
- indestructible = true, conf = conf, new SecurityManager(conf))
- // set it
- val sparkHostPort = hostname + ":" + boundPort
- actorSystem.actorOf(
- Props(classOf[CoarseGrainedExecutorBackend], driverUrl, executorId,
- sparkHostPort, cores),
- name = "Executor")
- workerUrl.foreach{ url =>
- actorSystem.actorOf(Props(classOf[WorkerWatcher], url), name =
"WorkerWatcher")
+ workerUrl: Option[String]) {
+
+ val sparkUser =
Option(System.getenv("SPARK_USER")).getOrElse(SparkContext.SPARK_UNKNOWN_USER)
--- End diff --
We could potentially just put this resolution of SPARK_USER inside
runAsUser (calling it maybe runAsSparkUser), to avoid duplication of this logic
and the weird SPARK_UNKNOWN_USER value.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---