[GitHub] nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for YARN and Mesos

2018-05-26 Thread GitBox
nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for 
YARN and Mesos
URL: https://github.com/apache/incubator-amaterasu/pull/20#discussion_r191065376
 
 

 ##
 File path: 
executor/src/main/scala/org/apache/spark/repl/amaterasu/runners/spark/SparkRunnerHelper.scala
 ##
 @@ -154,7 +154,7 @@ object SparkRunnerHelper extends Logging {
   .set("spark.master", master)
   .set("spark.executor.instances", "1") // TODO: change this
 
 Review comment:
   Change to take this from spark.opts


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for YARN and Mesos

2018-05-26 Thread GitBox
nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for 
YARN and Mesos
URL: https://github.com/apache/incubator-amaterasu/pull/20#discussion_r191065225
 
 

 ##
 File path: 
common/src/main/scala/org/apache/amaterasu/common/configuration/ClusterConfig.scala
 ##
 @@ -209,7 +209,7 @@ class ClusterConfig extends Logging {
 if (props.containsKey("timeout")) timeout = 
props.getProperty("timeout").asInstanceOf[Double]
 if (props.containsKey("mode")) mode = props.getProperty("mode")
 if (props.containsKey("workingFolder")) workingFolder = 
props.getProperty("workingFolder", s"/user/$user")
-
+if (props.containsKey("pysparkPath")) pysparkPath = 
props.getProperty("pysparkPath")
 
 Review comment:
   Check if needed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for YARN and Mesos

2018-05-26 Thread GitBox
nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for 
YARN and Mesos
URL: https://github.com/apache/incubator-amaterasu/pull/20#discussion_r191065242
 
 

 ##
 File path: executor/src/main/resources/spark_intp.py
 ##
 @@ -21,20 +21,10 @@
 import os
 import sys
 import zipimport
+sys.path.append(os.getcwd())
 from runtime import AmaContext, Environment
 
-# os.chdir(os.getcwd() + '/build/resources/test/')
 
 Review comment:
   Bring back the comments for testing
   add the sys.path.append to the spark_intp test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for YARN and Mesos

2018-05-26 Thread GitBox
nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for 
YARN and Mesos
URL: https://github.com/apache/incubator-amaterasu/pull/20#discussion_r191065225
 
 

 ##
 File path: 
common/src/main/scala/org/apache/amaterasu/common/configuration/ClusterConfig.scala
 ##
 @@ -209,7 +209,7 @@ class ClusterConfig extends Logging {
 if (props.containsKey("timeout")) timeout = 
props.getProperty("timeout").asInstanceOf[Double]
 if (props.containsKey("mode")) mode = props.getProperty("mode")
 if (props.containsKey("workingFolder")) workingFolder = 
props.getProperty("workingFolder", s"/user/$user")
-
+if (props.containsKey("pysparkPath")) pysparkPath = 
props.getProperty("pysparkPath")
 
 Review comment:
   Check if needed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for YARN and Mesos

2018-05-26 Thread GitBox
nadav-har-tzvi commented on a change in pull request #20: PySpark fixes for 
YARN and Mesos
URL: https://github.com/apache/incubator-amaterasu/pull/20#discussion_r191065217
 
 

 ##
 File path: 
executor/src/main/scala/org/apache/amaterasu/executor/execution/actions/runners/spark/SparkRunnersProvider.scala
 ##
 @@ -83,9 +84,15 @@ class SparkRunnersProvider extends RunnersProvider with 
Logging {
 sparkScalaRunner.initializeAmaContext(execData.env)
 
 runners.put(sparkScalaRunner.getIdentifier, sparkScalaRunner)
-
+var pypath = ""
 // TODO: get rid of hard-coded version
-lazy val pySparkRunner = PySparkRunner(execData.env, jobId, notifier, 
spark, 
s"${config.spark.home}/python:${config.spark.home}/python/pyspark:${config.spark.home}/python/pyspark/build:${config.spark.home}/python/pyspark/lib/py4j-0.10.4-src.zip",
 execData.pyDeps, config)
+config.mode match {
+  case "yarn" =>
+pypath = 
s"$$PYTHONPATH:$$SPARK_HOME/python:$$SPARK_HOME/python/build:${config.spark.home}/python:${config.spark.home}/python/pyspark:${config.spark.home}/python/pyspark/build:${config.spark.home}/python/pyspark/lib/py4j-0.10.4-src.zip:${new
 File(".").getAbsolutePath}"
 
 Review comment:
   Test if removing {config.spark.home} entries changes anything.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services