Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/9114#discussion_r42020079
--- Diff:
launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java
---
@@ -164,11 +166,16 @@ private void testCmdBuilder(boolean isDriver) throws
Exception {
launcher.setPropertiesFile(dummyPropsFile.getAbsolutePath());
launcher.appArgs.add("foo");
launcher.appArgs.add("bar");
- launcher.conf.put(SparkLauncher.DRIVER_MEMORY, "1g");
- launcher.conf.put(SparkLauncher.DRIVER_EXTRA_CLASSPATH, "/driver");
- launcher.conf.put(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS, "-Ddriver
-XX:MaxPermSize=256m");
- launcher.conf.put(SparkLauncher.DRIVER_EXTRA_LIBRARY_PATH, "/native");
launcher.conf.put("spark.foo", "foo");
+ // either set the property through "--conf" or through property file
+ if (!usePropertyFile) {
+ launcher.conf.put(SparkLauncher.DRIVER_MEMORY, "1g");
+ launcher.conf.put(SparkLauncher.DRIVER_EXTRA_CLASSPATH, "/driver");
+ launcher.conf.put(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS, "-Ddriver
-XX:MaxPermSize=256m");
+ launcher.conf.put(SparkLauncher.DRIVER_EXTRA_LIBRARY_PATH,
"/native");
+ } else {
+ launcher.childEnv.put("SPARK_CONF_DIR", "test/resources");
--- End diff --
I'm not sure this works the way you expect it too, and is probably the
cause of the test failure. You'll probably need to build the full path based on
`System.getProperty("spark.test.home")` (which is the root of the repo).
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]