This is an automated email from the ASF dual-hosted git repository.
yihua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 5c80acf497 [HUDI-4918] Fix bugs about when trying to show the non
-existing key from env, NullPointException occurs. (#6794)
5c80acf497 is described below
commit 5c80acf4974f89fb32842ae7481a27740962ad14
Author: Forus <[email protected]>
AuthorDate: Mon Sep 26 22:05:34 2022 +0800
[HUDI-4918] Fix bugs about when trying to show the non -existing key from
env, NullPointException occurs. (#6794)
---
.../src/main/java/org/apache/hudi/cli/commands/SparkEnvCommand.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkEnvCommand.java
b/hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkEnvCommand.java
index 5c21fe43e1..02778ac2cf 100644
--- a/hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkEnvCommand.java
+++ b/hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkEnvCommand.java
@@ -60,7 +60,7 @@ public class SparkEnvCommand {
if (key == null || key.isEmpty()) {
return showAllEnv();
} else {
- return HoodiePrintHelper.print(new String[] {"key", "value"}, new
String[][] {new String[] {key, env.get(key)}});
+ return HoodiePrintHelper.print(new String[] {"key", "value"}, new
String[][] {new String[] {key, env.getOrDefault(key, "")}});
}
}
}