You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2018/11/26 02:06:38 UTC

zeppelin git commit: ZEPPELIN-3870. Configuration in spark-defaults.conf doesn't take effect

Repository: zeppelin
Updated Branches:
  refs/heads/master ae7318f4c -> acd75b136


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

### What is this PR for?

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.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://jira.apache.org/jira/browse/ZEPPELIN-3870

### How should this be tested?
* CI pass

### Screenshots (if appropriate)

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

Author: Jeff Zhang <zj...@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


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

Branch: refs/heads/master
Commit: acd75b1367b4d8ebf6b1a6ecd4a6cd75921e1f38
Parents: ae7318f
Author: Jeff Zhang <zj...@apache.org>
Authored: Wed Nov 21 14:17:15 2018 +0800
Committer: jeffzhang.zjf <je...@alibaba-inc.com>
Committed: Mon Nov 26 10:06:32 2018 +0800

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


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/acd75b13/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 dde73a7..037b293 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.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
@@ -343,9 +344,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));
         }
       }
@@ -470,7 +469,7 @@ public class RemoteInterpreterServer extends Thread
         context.getGui(),
         context.getNoteGui());
   }
-  
+
   class InterpretJobListener implements JobListener {
 
     @Override