This is an automated email from the ASF dual-hosted git repository.

zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new de4c0bc  [HOTFIX] Fix travis CI
de4c0bc is described below

commit de4c0bc4a2d99143b8459a9fb0d4ba59cac084dd
Author: Jeff Zhang <[email protected]>
AuthorDate: Wed Jul 24 16:15:56 2019 +0800

    [HOTFIX] Fix travis CI
    
    (cherry picked from commit 4d62ad3b05c2adf13c827c85a4b08343d2ac808f)
---
 .travis.yml                                        | 67 +++++++++++-----------
 .../zeppelin/integration/JdbcIntegrationTest.java  |  2 +-
 .../apache/zeppelin/cluster/ClusterEventTest.java  | 21 ++++---
 .../cluster/ClusterNoteEventListenerTest.java      | 12 ++--
 .../zeppelin/cluster/ZeppelinServerMock.java       | 14 ++---
 .../apache/zeppelin/rest/AbstractTestRestApi.java  | 13 +++--
 .../src/test/resources/log4j.properties            |  4 +-
 zeppelin-zengine/pom.xml                           |  2 +-
 .../zeppelin/storage/LocalConfigStorage.java       |  9 +--
 .../src/test/resources/log4j.properties            |  2 +-
 10 files changed, 77 insertions(+), 69 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8eacc4c..ef2193a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,6 +45,9 @@ addons:
     - mysql-server
     - mysql-client
 
+services:
+  - mysql
+
 env:
   global:
     # Interpreters does not required by zeppelin-server integration tests
@@ -53,14 +56,14 @@ env:
 matrix:
   include:
     # Test License compliance using RAT tool
-    - jdk: "oraclejdk8"
-      dist: trusty
+    - jdk: "openjdk8"
+      dist: xenial
       env: SCALA_VER="2.11" PROFILE="-Prat" BUILD_FLAG="clean" 
TEST_FLAG="org.apache.rat:apache-rat-plugin:check" TEST_PROJECTS=""
 
     # Default build command, no tests
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_FLAG="clean package -DskipTests" TEST_FLAG="test -DskipTests"
 
     # Run e2e tests (in zeppelin-web)
@@ -68,8 +71,8 @@ matrix:
     # also, can't use JDK 7 in trusty: 
https://github.com/travis-ci/travis-ci/issues/7884
     - os: linux
       sudo: false
-      dist: trusty
-      jdk: "oraclejdk8"
+      dist: xenial
+      jdk: "openjdk8"
       env: CI="true" WEB_E2E="true" PYTHON="2" SCALA_VER="2.11" 
SPARK_VER="2.1.0" HADOOP_VER="2.6" PROFILE="-Phadoop2 -Pscala-2.11" 
BUILD_FLAG="install -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" 
MODULES="-pl ${INTERPRETERS}" TEST_MODULES="-pl zeppelin-web" 
TEST_PROJECTS="-Pweb-e2e"
       addons:
         apt:
@@ -81,75 +84,75 @@ matrix:
     # HeliumApplicationFactoryTest - 
https://issues.apache.org/jira/browse/ZEPPELIN-2470
     # After issues are fixed these tests need to be included back by removing 
them from the "-Dtests.to.exclude" property
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
-      env: PYTHON="3" SPARKR="true" PROFILE="-Pspark-2.2 -Phelium-dev 
-Pexamples -Pspark-scala-2.11" BUILD_FLAG="install -Pbuild-distr -DskipRat" 
TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" MODULES="-pl 
${INTERPRETERS}" 
TEST_PROJECTS="-Dtests.to.exclude=**/JdbcIntegrationTest.java,**/SparkIntegrationTest.java,**/ZeppelinSparkClusterTest.java,**/org/apache/zeppelin/spark/*,**/HeliumApplicationFactoryTest.java
 -DfailIfNoTests=false"
+      jdk: "openjdk8"
+      dist: xenial
+      env: PYTHON="3" SPARKR="true" PROFILE="-Pspark-2.2 -Phelium-dev 
-Pexamples -Pspark-scala-2.11" BUILD_FLAG="clean install -Pbuild-distr 
-DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" MODULES="-pl 
${INTERPRETERS}" 
TEST_PROJECTS="-Dtests.to.exclude=**/JdbcIntegrationTest.java,**/SparkIntegrationTest.java,**/ZeppelinSparkClusterTest.java,**/org/apache/zeppelin/spark/*,**/HeliumApplicationFactoryTest.java
 -DfailIfNoTests=false"
 
     # Test selenium with spark module for spark 2.3
-    - jdk: "oraclejdk8"
-      dist: trusty
+    - jdk: "openjdk8"
+      dist: xenial
       addons:
         firefox: "31.0"
-      env: BUILD_PLUGINS="true" CI="true" PYTHON="2" SCALA_VER="2.11" 
SPARK_VER="2.3.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.3 -Phadoop2 -Phelium-dev 
-Pexamples -Pintegration -Pspark-scala-2.11" BUILD_FLAG="install -DskipTests 
-DskipRat -pl ${INTERPRETERS}" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl 
zeppelin-integration -DfailIfNoTests=false"
+      env: BUILD_PLUGINS="true" CI="true" PYTHON="2" SCALA_VER="2.11" 
SPARK_VER="2.3.2" HADOOP_VER="2.6" PROFILE="-Pspark-2.3 -Phadoop2 -Phelium-dev 
-Pexamples -Pintegration -Pspark-scala-2.11" BUILD_FLAG="clean install 
-DskipTests -DskipRat -pl ${INTERPRETERS}" TEST_FLAG="verify -DskipRat" 
TEST_PROJECTS="-pl zeppelin-integration -DfailIfNoTests=false"
 
     # Test interpreter modules
-    - jdk: "oraclejdk8"
-      dist: trusty
-      env: PYTHON="3" SPARKR="true" SCALA_VER="2.10" TENSORFLOW="1.0.0" 
PROFILE="-Pscala-2.10" BUILD_FLAG="install -DskipTests -DskipRat -am" 
TEST_FLAG="test -DskipRat" MODULES="-pl $(echo 
.,zeppelin-interpreter,zeppelin-interpreter-api,${INTERPRETERS} | sed 
's/!//g')" TEST_PROJECTS=""
+    - jdk: "openjdk8"
+      dist: xenial
+      env: PYTHON="3" SPARKR="true" SCALA_VER="2.10" TENSORFLOW="1.0.0" 
PROFILE="-Pscala-2.10" BUILD_FLAG="clean install -DskipTests -DskipRat -am" 
TEST_FLAG="test -DskipRat" MODULES="-pl $(echo 
.,zeppelin-interpreter,zeppelin-interpreter-api,${INTERPRETERS} | sed 
's/!//g')" TEST_PROJECTS=""
 
     # Run Spark integration test and unit test separately for each spark 
version
 
     # ZeppelinSparkClusterTest24, SparkIntegrationTest24, JdbcIntegrationTest, 
Unit test of Spark 2.4 (Scala-2.11)
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="2" SCALA_VER="2.11" 
PROFILE="-Pspark-2.4 -Pspark-scala-2.11 -Phadoop2 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,jdbc,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest24,SparkIntegrationTest24,JdbcIntegrationTest,org.apache.zeppelin.spark.*
 -DfailIfNoTests=false"
 
     # ZeppelinSparkClusterTest24, SparkIntegrationTest24, JdbcIntegrationTest, 
Unit test of Spark 2.4 (Scala-2.12)
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="2" SCALA_VER="2.12" 
PROFILE="-Pspark-2.4 -Pspark-scala-2.12 -Phadoop2 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,jdbc,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest24,SparkIntegrationTest24,JdbcIntegrationTest,org.apache.zeppelin.spark.*
 -DfailIfNoTests=false"
 
     # ZeppelinSparkClusterTest23, SparkIntegrationTest23, Unit test of Spark 
2.3 (Scala-2.11) and Unit test PythonInterpreter under python2
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="2" SCALA_VER="2.11" 
PROFILE="-Pspark-2.3 -Pspark-scala-2.11 -Phadoop2 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest23,SparkIntegrationTest23,org.apache.zeppelin.spark.*,apache.zeppelin.python.*
 -DfailIfNoTests=false"
 
     # ZeppelinSparkClusterTest22, SparkIntegrationTest22, Unit test of Spark 
2.2 (Scala-2.10) and Unit test PythonInterpreter under python3
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="3" SCALA_VER="2.10" 
PROFILE="-Pspark-2.2 -Pspark-scala-2.10 -Phadoop2 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest22,SparkIntegrationTest22,org.apache.zeppelin.spark.*,apache.zeppelin.python.*
 -DfailIfNoTests=false"
 
     # ZeppelinSparkClusterTest21, SparkIntegrationTest21, Unit test of Spark 
2.1 (Scala-2.10)
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="3" SCALA_VER="2.10" 
PROFILE="-Pspark-2.1 -Phadoop2 -Pspark-scala-2.10 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest21,SparkIntegrationTest21,org.apache.zeppelin.spark.*
 -DfailIfNoTests=false"
 
     # ZeppelinSparkClusterTest20, SparkIntegrationTest20, Unit test of Spark 
2.0  (Scala-2.10)
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="3" SCALA_VER="2.10" 
PROFILE="-Pspark-2.0 -Phadoop2 -Pspark-scala-2.10 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest20,SparkIntegrationTest20,org.apache.zeppelin.spark.*
 -DfailIfNoTests=false"
 
     # ZeppelinSparkClusterTest16, SparkIntegrationTest16, Unit test of Spark 
1.6  (Scala-2.10)
     - sudo: required
-      jdk: "oraclejdk8"
-      dist: trusty
+      jdk: "openjdk8"
+      dist: xenial
       env: BUILD_PLUGINS="true" PYTHON="3" SCALA_VER="2.10" 
PROFILE="-Pspark-1.6 -Phadoop2 -Pspark-scala-2.10 -Pintegration" SPARKR="true" 
BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat -am" 
MODULES="-pl 
zeppelin-interpreter-integration,zeppelin-web,spark/spark-dependencies" 
TEST_PROJECTS="-Dtest=ZeppelinSparkClusterTest16,SparkIntegrationTest16,org.apache.zeppelin.spark.*
 -DfailIfNoTests=false"
 
     # Test python/pyspark with python 2, livy 0.5
     - sudo: required
-      dist: trusty
-      jdk: "oraclejdk8"
+      dist: xenial
+      jdk: "openjdk8"
       env: PYTHON="2" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" 
LIVY_VER="0.5.0-incubating" PROFILE="-Pspark-1.6 -Phadoop2 -Pscala-2.10" 
BUILD_FLAG="install -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" 
MODULES="-pl livy" TEST_PROJECTS=""
 
     # Test livy 0.5 with spark 2.2.0 under python3
     - sudo: required
-      dist: trusty
+      dist: xenial
       jdk: "openjdk8"
       env: PYTHON="3" SPARK_VER="2.2.0" HADOOP_VER="2.6" 
LIVY_VER="0.5.0-incubating" PROFILE="" BUILD_FLAG="install -am -DskipTests 
-DskipRat" TEST_FLAG="verify -DskipRat" MODULES="-pl livy" TEST_PROJECTS=""
 
diff --git 
a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java
 
b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java
index 73913a6..81d2812 100644
--- 
a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java
+++ 
b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java
@@ -77,6 +77,6 @@ public class JdbcIntegrationTest {
             .setAuthenticationInfo(AuthenticationInfo.ANONYMOUS)
             .build();
     InterpreterResult interpreterResult = jdbcInterpreter.interpret("show 
databases;", context);
-    assertEquals(InterpreterResult.Code.SUCCESS, interpreterResult.code());
+    assertEquals(interpreterResult.toString(), InterpreterResult.Code.SUCCESS, 
interpreterResult.code());
   }
 }
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterEventTest.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterEventTest.java
index 265a61d..7c8db0f 100644
--- 
a/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterEventTest.java
+++ 
b/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterEventTest.java
@@ -98,7 +98,7 @@ public class ClusterEventTest extends ZeppelinServerMock {
   public static void init() throws Exception {
     ZeppelinConfiguration zconf = genZeppelinConf();
 
-    ZeppelinServerMock.startUp(ClusterEventTest.class.getSimpleName(), zconf);
+    ZeppelinServerMock.startUp("ClusterEventTest", zconf);
     notebook = TestUtils.getInstance(Notebook.class);
     authorizationService = new AuthorizationService(notebook, zconf);
 
@@ -140,14 +140,21 @@ public class ClusterEventTest extends ZeppelinServerMock {
 
   @AfterClass
   public static void destroy() throws Exception {
-    ZeppelinServerMock.shutDown();
+    try {
+      if (null != clusterClient) {
+        clusterClient.shutdown();
+      }
+      for (ClusterManagerServer clusterServer : clusterServers) {
+        clusterServer.shutdown();
+      }
 
-    if (null != clusterClient) {
-      clusterClient.shutdown();
-    }
-    for (ClusterManagerServer clusterServer : clusterServers) {
-      clusterServer.shutdown();
+      ZeppelinServerMock.shutDown();
+    } finally {
+      // Because zconf is a single instance, it needs clean cluster address
+      ZeppelinConfiguration zconf = ZeppelinConfiguration.create();
+      zconf.setClusterAddress("");
     }
+
     LOGGER.info("stopCluster <<<");
   }
 
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterNoteEventListenerTest.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterNoteEventListenerTest.java
index a6c1708..cf5687c 100644
--- 
a/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterNoteEventListenerTest.java
+++ 
b/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ClusterNoteEventListenerTest.java
@@ -40,7 +40,7 @@ public class ClusterNoteEventListenerTest implements 
ClusterEventListener {
   @Override
   public void onClusterEvent(String msg) {
     receiveMsg = msg;
-    LOGGER.info("ClusterNoteEventListenerTest#onClusterEvent : {}", msg);
+    LOGGER.debug("ClusterNoteEventListenerTest#onClusterEvent : {}", msg);
     ClusterMessage message = ClusterMessage.deserializeMessage(msg);
 
     Note note = null;
@@ -53,23 +53,23 @@ public class ClusterNoteEventListenerTest implements 
ClusterEventListener {
       String json = entry.getValue();
       if (key.equals("AuthenticationInfo")) {
         authenticationInfo = AuthenticationInfo.fromJson(json);
-        LOGGER.info(authenticationInfo.toJson());
+        LOGGER.debug(authenticationInfo.toJson());
       } else if (key.equals("Note")) {
         note = Note.fromJson(json);
-        LOGGER.info(note.toJson());
+        LOGGER.debug(note.toJson());
       } else if (key.equals("Paragraph")) {
         paragraph = Paragraph.fromJson(json);
-        LOGGER.info(paragraph.toJson());
+        LOGGER.debug(paragraph.toJson());
       } else if (key.equals("Set<String>")) {
         Gson gson = new Gson();
         userAndRoles = gson.fromJson(json, new TypeToken<Set<String>>() {
         }.getType());
-        LOGGER.info(userAndRoles.toString());
+        LOGGER.debug(userAndRoles.toString());
       } else if (key.equals("Map<String, Paragraph>")) {
         Gson gson = new Gson();
         userParagraphMap = gson.fromJson(json, new TypeToken<Map<String, 
Paragraph>>() {
         }.getType());
-        LOGGER.info(userParagraphMap.toString());
+        LOGGER.debug(userParagraphMap.toString());
       } else {
         receiveMsg = null;
         fail("Unknown clusterEvent : " + message.clusterEvent);
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ZeppelinServerMock.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ZeppelinServerMock.java
index 6a45934..9d1c893 100644
--- 
a/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ZeppelinServerMock.java
+++ 
b/zeppelin-server/src/test/java/org/apache/zeppelin/cluster/ZeppelinServerMock.java
@@ -126,10 +126,6 @@ public class ZeppelinServerMock {
           notebookDir.getPath()
       );
       LOG.info("zconf.getClusterAddress() = {}", zconf.getClusterAddress());
-      System.setProperty(
-          ZeppelinConfiguration.ConfVars.ZEPPELIN_CLUSTER_ADDR.getVarName(),
-          zconf.getClusterAddress()
-      );
 
       // some test profile does not build zeppelin-web.
       // to prevent zeppelin starting up fail, create zeppelin-web/dist 
directory
@@ -174,7 +170,7 @@ public class ZeppelinServerMock {
           
TestUtils.getInstance(Notebook.class).getInterpreterSettingManager().restart(setting.getId());
         }
       }
-      LOG.info("ZeppelinServerMock Zeppelin...");
+      LOG.info("ZeppelinServerMock shutDown...");
       ZeppelinServer.jettyWebServer.stop();
       executor.shutdown();
       PluginManager.reset();
@@ -192,12 +188,12 @@ public class ZeppelinServerMock {
         throw new RuntimeException("Can not stop Zeppelin server");
       }
 
+      ClusterManagerServer clusterManagerServer = 
ClusterManagerServer.getInstance();
+      clusterManagerServer.shutdown();
+
       LOG.info("ZeppelinServerMock terminated.");
 
-      if (deleteConfDir && 
!TestUtils.getInstance(Notebook.class).getConf().isRecoveryEnabled()) {
-        // don't delete interpreter.json when recovery is enabled. otherwise 
the interpreter setting
-        // id will change after zeppelin restart, then we can not recover 
interpreter process
-        // properly
+      if (deleteConfDir) {
         FileUtils.deleteDirectory(confDir);
       }
     }
diff --git 
a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
 
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
index 41d5970..0331abf 100644
--- 
a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
+++ 
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java
@@ -179,7 +179,7 @@ public abstract class AbstractTestRestApi {
           throws Exception {
     LOG.info("Starting ZeppelinServer withAuth: {}, testClassName: {}, 
withKnox: {}",
         withAuth, testClassName, withKnox);
-    
+
     if (!WAS_RUNNING) {
       // copy the resources files to a temp folder
       zeppelinHome = new File("..");
@@ -211,6 +211,7 @@ public abstract class AbstractTestRestApi {
 
       LOG.info("Staring test Zeppelin up...");
       ZeppelinConfiguration conf = ZeppelinConfiguration.create();
+      LOG.info("zconf.getClusterAddress() = {}", conf.getClusterAddress());
 
       if (withAuth) {
         isRunningWithAuth = true;
@@ -259,11 +260,11 @@ public abstract class AbstractTestRestApi {
   protected static void startUpWithKnoxEnable(String testClassName) throws 
Exception {
     start(true, testClassName, true, true);
   }
-  
+
   protected static void startUpWithAuthenticationEnable(String testClassName) 
throws Exception {
     start(true, testClassName, false, true);
   }
-  
+
   protected static void startUp(String testClassName) throws Exception {
     start(false, testClassName, false, true);
   }
@@ -318,7 +319,7 @@ public abstract class AbstractTestRestApi {
       }
 
       LOG.info("Test Zeppelin terminated.");
-      
+
       if (isRunningWithAuth) {
         isRunningWithAuth = false;
         System
@@ -356,7 +357,7 @@ public abstract class AbstractTestRestApi {
   protected static GetMethod httpGet(String path) throws IOException {
     return httpGet(path, StringUtils.EMPTY, StringUtils.EMPTY);
   }
-  
+
   protected static GetMethod httpGet(String path, String user, String pwd) 
throws IOException {
     return httpGet(path, user, pwd, StringUtils.EMPTY);
   }
@@ -466,7 +467,7 @@ public abstract class AbstractTestRestApi {
     }
     return true;
   }
-  
+
   protected Matcher<HttpMethodBase> responsesWith(final int 
expectedStatusCode) {
     return new TypeSafeMatcher<HttpMethodBase>() {
       WeakReference<HttpMethodBase> method;
diff --git a/zeppelin-server/src/test/resources/log4j.properties 
b/zeppelin-server/src/test/resources/log4j.properties
index 9c22fdc..70e4e8f 100644
--- a/zeppelin-server/src/test/resources/log4j.properties
+++ b/zeppelin-server/src/test/resources/log4j.properties
@@ -43,5 +43,5 @@ log4j.logger.DataNucleus.Datastore=ERROR
 log4j.logger.org.hibernate.type=ALL
 log4j.logger.org.apache.hadoop=WARN
 
-log4j.logger.org.apache.zeppelin.interpreter=DEBUG
-log4j.logger.org.apache.zeppelin.scheduler=DEBUG
+log4j.logger.org.apache.zeppelin.interpreter=INFO
+log4j.logger.org.apache.zeppelin.scheduler=INFO
diff --git a/zeppelin-zengine/pom.xml b/zeppelin-zengine/pom.xml
index 11878ed..3fd44c7 100644
--- a/zeppelin-zengine/pom.xml
+++ b/zeppelin-zengine/pom.xml
@@ -276,7 +276,7 @@
         <configuration>
           <forkMode>always</forkMode>
           <systemProperties>
-            <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
+            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
           </systemProperties>
         </configuration>
       </plugin>
diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
index b91ded4..b92182d 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/storage/LocalConfigStorage.java
@@ -32,6 +32,7 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.FileSystems;
 import java.nio.file.FileSystem;
+import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 
 /**
@@ -107,8 +108,7 @@ public class LocalConfigStorage extends ConfigStorage {
   }
 
   private void atomicWriteToFile(String content, File file) throws IOException 
{
-    File directory = file.getParentFile();
-    File tempFile = File.createTempFile(file.getName(), null, directory);
+    File tempFile = Files.createTempFile(file.getName(), null).toFile();
     FileOutputStream out = new FileOutputStream(tempFile);
     try {
       IOUtils.write(content, out);
@@ -120,10 +120,11 @@ public class LocalConfigStorage extends ConfigStorage {
     }
     out.close();
     FileSystem defaultFileSystem = FileSystems.getDefault();
-    Path tempFilePath = defaultFileSystem.getPath(tempFile.getCanonicalPath());
     Path destinationFilePath = 
defaultFileSystem.getPath(file.getCanonicalPath());
     try {
-      Files.move(tempFilePath, destinationFilePath, 
StandardCopyOption.ATOMIC_MOVE);
+      file.getParentFile().mkdirs();
+      Files.move(tempFile.toPath(), destinationFilePath,
+              StandardCopyOption.ATOMIC_MOVE);
     } catch (IOException iox) {
       if (!tempFile.delete()) {
         tempFile.deleteOnExit();
diff --git a/zeppelin-zengine/src/test/resources/log4j.properties 
b/zeppelin-zengine/src/test/resources/log4j.properties
index 354a8bc..4550ccd 100644
--- a/zeppelin-zengine/src/test/resources/log4j.properties
+++ b/zeppelin-zengine/src/test/resources/log4j.properties
@@ -43,4 +43,4 @@ log4j.logger.DataNucleus.Datastore=ERROR
 log4j.logger.org.hibernate.type=ALL
 
 log4j.logger.org.apache.hadoop=WARN
-log4j.logger.org.apache.zeppelin.interpreter.remote.RemoteInterpreterManagedProcess=DEBUG
+log4j.logger.org.apache.zeppelin.interpreter.remote.RemoteInterpreterManagedProcess=INFO

Reply via email to