Skip to content

Commit

Permalink
Fix SparkSubmitParameterModifier issue (#2837) (#2839)
Browse files Browse the repository at this point in the history
(cherry picked from commit 607354c)

Signed-off-by: Tomoyuki Morita <moritato@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent b1904e0 commit bebf31a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ public SparkSubmitParametersBuilder sessionExecution(String sessionId, String da
}

public SparkSubmitParametersBuilder acceptModifier(SparkSubmitParameterModifier modifier) {
modifier.modifyParameters(this);
if (modifier != null) {
modifier.modifyParameters(this);
}
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ public void testAcceptModifier() {
verify(sparkSubmitParameterModifier).modifyParameters(sparkSubmitParametersBuilder);
}

@Test
public void testAcceptNullModifier() {
sparkSubmitParametersBuilder.acceptModifier(null);
}

@Test
public void testDataSource() {
when(sparkParameterComposerCollection.isComposerRegistered(DataSourceType.S3GLUE))
Expand Down

0 comments on commit bebf31a

Please sign in to comment.