Github user mateiz commented on a diff in the pull request: https://github.com/apache/spark/pull/799#discussion_r12723592 --- Diff: python/pyspark/java_gateway.py --- @@ -34,9 +34,13 @@ def launch_gateway(): # Launch the Py4j gateway using Spark's run command so that we pick up the # proper classpath and settings from spark-env.sh on_windows = platform.system() == "Windows" - script = "./bin/spark-class.cmd" if on_windows else "./bin/spark-class" - command = [os.path.join(SPARK_HOME, script), "py4j.GatewayServer", - "--die-on-broken-pipe", "0"] + script = "./bin/spark-submit.cmd" if on_windows else "./bin/spark-submit" + submit_args = os.environ.get("PYSPARK_SUBMIT_ARGS") + if submit_args is not None: + submit_args = submit_args.split(" ") --- End diff -- This probably won't work if there are quoted strings in the args, e.g. `pyspark --name "my app"`. Do we really need to pass it this way? Can't we use `sys.argv` or something like that and just pass the args to Python?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---