zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject zeppelin git commit: ZEPPELIN-3870. Configuration in spark-defaults.conf doesn't take effect
Date Mon, 26 Nov 2018 02:10:02 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 30719e8c0 -> 8d9b34157


ZEPPELIN-3870. Configuration in spark-defaults.conf doesn't take effect

By default, spark.executor.memory is not set in spark's interpreter setting, if I set it in
spark-defaults.xml, then it won't take effect. Because spark.executor.memory in spark's interpreter
setting will override that value in spark-defaults.xml. This doesn't make sense, we should
only override property in spark-default.xml when you have non-empty value.

[Bug Fix]

* [ ] - Task

* https://jira.apache.org/jira/browse/ZEPPELIN-3870

* CI pass

* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjffdu@apache.org>

Closes #3238 from zjffdu/ZEPPELIN-3870 and squashes the following commits:

b6c001764 [Jeff Zhang] ZEPPELIN-3870. Configuration in spark-defaults.conf doesn't take effect
when it is empty in interpreter setting

(cherry picked from commit acd75b1367b4d8ebf6b1a6ecd4a6cd75921e1f38)
Signed-off-by: jeffzhang.zjf <jeffzhang.zjf@alibaba-inc.com>


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/8d9b3415
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/8d9b3415
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/8d9b3415

Branch: refs/heads/branch-0.8
Commit: 8d9b34157e56a6d0503af5e70082f4c0c786d249
Parents: 30719e8
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Wed Nov 21 14:17:15 2018 +0800
Committer: jeffzhang.zjf <jeffzhang.zjf@alibaba-inc.com>
Committed: Mon Nov 26 10:09:49 2018 +0800

----------------------------------------------------------------------
 .../zeppelin/interpreter/remote/RemoteInterpreterServer.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8d9b3415/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
index 2376579..3eb8daa 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
@@ -19,6 +19,7 @@ package org.apache.zeppelin.interpreter.remote;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.thrift.TException;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerSocket;
@@ -336,9 +337,7 @@ public class RemoteInterpreterServer extends Thread
     for (Object key : properties.keySet()) {
       if (!RemoteInterpreterUtils.isEnvString((String) key)) {
         String value = properties.getProperty((String) key);
-        if (value == null || value.isEmpty()) {
-          System.clearProperty((String) key);
-        } else {
+        if (!StringUtils.isBlank(value)) {
           System.setProperty((String) key, properties.getProperty((String) key));
         }
       }


Mime
View raw message