spark: set JAVA_HOME for hadoop CLASSPATH fetching (#9439)

Sets the `JAVA_HOME` in the `hadoop` subprocess called during
`spark.setup_environment`.
This commit is contained in:
Matt Belhorn 2018-10-18 15:45:11 -04:00 committed by Peter Scheibel
parent a2dc958248
commit 0f5f49f751

View File

@ -49,6 +49,7 @@ def install_dir(dirname):
@when('+hadoop')
def setup_environment(self, spack_env, run_env):
hadoop = self.spec['hadoop'].command
hadoop.add_default_env('JAVA_HOME', self.spec['java'].home)
hadoop_classpath = hadoop('classpath', output=str)
# Remove whitespaces, as they can compromise syntax in