Return-Path: X-Original-To: apmail-spark-reviews-archive@minotaur.apache.org Delivered-To: apmail-spark-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DAE37118A4 for ; Tue, 26 Aug 2014 09:19:51 +0000 (UTC) Received: (qmail 8892 invoked by uid 500); 26 Aug 2014 09:19:51 -0000 Delivered-To: apmail-spark-reviews-archive@spark.apache.org Received: (qmail 8865 invoked by uid 500); 26 Aug 2014 09:19:51 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 8853 invoked by uid 99); 26 Aug 2014 09:19:51 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2014 09:19:51 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3EEF4A02AA1; Tue, 26 Aug 2014 09:19:51 +0000 (UTC) From: liancheng To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request: [SPARK-2608] fix executor backend launch commo... Content-Type: text/plain Message-Id: <20140826091951.3EEF4A02AA1@tyr.zones.apache.org> Date: Tue, 26 Aug 2014 09:19:51 +0000 (UTC) Github user liancheng commented on a diff in the pull request: https://github.com/apache/spark/pull/1986#discussion_r16703504 --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala --- @@ -96,18 +99,39 @@ private[spark] class MesosSchedulerBackend( .setValue(value) .build()) } - val command = CommandInfo.newBuilder() + val mesosCommand = CommandInfo.newBuilder() .setEnvironment(environment) - val uri = sc.conf.get("spark.executor.uri", null) - if (uri == null) { - command.setValue(new File(sparkHome, "/sbin/spark-executor").getCanonicalPath) + + val extraJavaOpts = conf.getOption("spark.executor.extraJavaOptions") + .map(Utils.splitCommandString).getOrElse(Seq.empty) + + // Start executors with a few necessary configs for registering with the scheduler + val sparkJavaOpts = Utils.sparkJavaOpts(conf, SparkConf.isExecutorStartupConf) + val javaOpts = sparkJavaOpts ++ extraJavaOpts + + val classPathEntries = conf.getOption("spark.executor.extraClassPath").toSeq.flatMap { cp => + cp.split(java.io.File.pathSeparator) + } + val libraryPathEntries = + conf.getOption("spark.executor.extraLibraryPath").toSeq.flatMap { cp => + cp.split(java.io.File.pathSeparator) + } + + val command = Command( + "org.apache.spark.executor.MesosExecutorBackend", Nil, sc.executorEnvs, + classPathEntries, libraryPathEntries, javaOpts) --- End diff -- Should set `PYTHONPATH` as what `sbin/spark-executor` does somehow. --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org