Skip to content

Commit

Permalink
Fix wording when account is missing in a cosmos serverless config (#2691
Browse files Browse the repository at this point in the history
)
  • Loading branch information
konjac authored Jan 22, 2019
1 parent 2621de5 commit ba179e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class CosmosServerlessSparkConfiguration(name: String, override val module: Cosm

override fun getSuggestedNamePrefix() : String = "[Spark on Cosmos Serverless]"

override fun getErrorMessageClusterNull(): String = "The account should be selected as the target for Spark application submission"

@Throws(RuntimeConfigurationException::class)
override fun checkSubmissionConfigurationBeforeRun(runner: SparkSubmissionRunner) {
super.checkSubmissionConfigurationBeforeRun(runner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,14 @@ protected void checkBuildSparkJobBeforeRun(@NotNull SparkSubmissionRunner runner
}
}

protected String getErrorMessageClusterNull() {
return "The cluster should be selected as the target for Spark application submission";
}

protected void checkSubmissionConfigurationBeforeRun(@NotNull SparkSubmissionRunner runner) throws RuntimeConfigurationException {
SparkSubmissionParameter parameter = getSubmitModel().getSubmissionParameter();
if (StringUtils.isBlank(parameter.getClusterName())) {
throw new RuntimeConfigurationError("The cluster should be selected as the target for Spark application submission");
throw new RuntimeConfigurationError(this.getErrorMessageClusterNull());
}

if (!parameter.isLocalArtifact()) {
Expand Down

0 comments on commit ba179e1

Please sign in to comment.