How do I set python optimized mode (-O
param for interpreter) on an executor running on a Spark slave?
(Apparently the Python interpreter for the executor is launched using this line
val pb = new ProcessBuilder(Arrays.asList(pythonExec, "-m", "pyspark.worker"))
in org/apache/spark/api/python/PythonWorkerFactory.scala
.
But I don't see a way of setting the -O
flag.)