diff --git a/hopsworks-IT/src/test/ruby/spec/jupyter_spec.rb b/hopsworks-IT/src/test/ruby/spec/jupyter_spec.rb index db28bb35f7..bd739f7983 100644 --- a/hopsworks-IT/src/test/ruby/spec/jupyter_spec.rb +++ b/hopsworks-IT/src/test/ruby/spec/jupyter_spec.rb @@ -294,6 +294,15 @@ update_jupyter(@project, settings) end + it "should work to start jupyter server with spark files attached" do + get_settings(@project) + settings = json_body + settings[:jobConfig][:"spark.yarn.dist.files"]="hdfs:///Projects/#{@project[:projectname]}/Resources/README.md" + start_jupyter(@project, settings: settings) + jupyter_running(@project, expected_status: 200) + stop_jupyter(@project) + end + it "should not allow starting multiple notebook servers" do start_jupyter(@project) start_jupyter(@project, expected_status: 400) diff --git a/hopsworks-common/src/main/java/io/hops/hopsworks/common/jobs/spark/SparkController.java b/hopsworks-common/src/main/java/io/hops/hopsworks/common/jobs/spark/SparkController.java index 91f4cbccb1..42fec9ab68 100644 --- a/hopsworks-common/src/main/java/io/hops/hopsworks/common/jobs/spark/SparkController.java +++ b/hopsworks-common/src/main/java/io/hops/hopsworks/common/jobs/spark/SparkController.java @@ -218,8 +218,8 @@ public void inspectDependencies(Project project, Users user, SparkJobConfigurati throws ProjectException, GenericException { DistributedFileSystemOps udfso = null; try { + udfso = dfs.getDfsOps(hdfsUsersBean.getHdfsUserName(project, user)); if(isJob) { - udfso = dfs.getDfsOps(hdfsUsersBean.getHdfsUserName(project, user)); if (!udfso.exists(jobConf.getAppPath())) { throw new ProjectException(RESTCodes.ProjectErrorCode.FILE_NOT_FOUND, Level.FINEST, "Job application file does not exist: " + jobConf.getAppPath());