Skip to content

Commit

Permalink
rsc: Don't set spark configuration values to an empty string
Browse files Browse the repository at this point in the history
It's better to leave out a key rather than set the value to an
empty string
  • Loading branch information
c2zwdjnlcg committed Aug 17, 2023
1 parent 074d6a2 commit 6776882
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rsc/src/main/java/org/apache/livy/rsc/ContextLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ public void run() {

private static void merge(RSCConf conf, String key, String livyConf, String sep) {
String confValue = Utils.join(Arrays.asList(livyConf, conf.get(key)), sep);
conf.set(key, confValue);
if (confValue != null && !confValue.isEmpty()) {
conf.set(key, confValue);
}
}

/**
Expand Down

0 comments on commit 6776882

Please sign in to comment.