diff --git a/python/run-tests.py b/python/run-tests.py index d7e690c4c663a..282fe5afa1963 100755 --- a/python/run-tests.py +++ b/python/run-tests.py @@ -87,9 +87,10 @@ def run_individual_python_test(target_dir, test_name, pyspark_python): env["TMPDIR"] = tmp_dir # Also override the JVM's temp directory by setting driver and executor options. + java_options = "-Djava.io.tmpdir={0} -Dio.netty.tryReflectionSetAccessible=true".format(tmp_dir) spark_args = [ - "--conf", "spark.driver.extraJavaOptions='-Djava.io.tmpdir={0} -Dio.netty.tryReflectionSetAccessible=true'".format(tmp_dir), - "--conf", "spark.executor.extraJavaOptions='-Djava.io.tmpdir={0} -Dio.netty.tryReflectionSetAccessible=true'".format(tmp_dir), + "--conf", "spark.driver.extraJavaOptions='{0}'".format(java_options), + "--conf", "spark.executor.extraJavaOptions='{0}'".format(java_options), "pyspark-shell" ] env["PYSPARK_SUBMIT_ARGS"] = " ".join(spark_args)