zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject zeppelin git commit: ZEPPELIN-1826. Flaky Test: ZeppelinSparkClusterTest.zRunTest
Date Fri, 06 Jan 2017 02:06:22 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master eb893baa8 -> 334dba597


ZEPPELIN-1826. Flaky Test: ZeppelinSparkClusterTest.zRunTest

### What is this PR for?
Fix the flaky test of ZeppelinSparkClusterTest.zRunTest. The root cause is that z.run is not
a blocking call so we still need the check the paragraph status. (see code change for details).

Besides that, I also add more logging. This helps me a lot.

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Task

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

### Questions:
* 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 #1788 from zjffdu/ZEPPELIN-1826 and squashes the following commits:

5c22791 [Jeff Zhang] ZEPPELIN-1826. Flaky Test: ZeppelinSparkClusterTest.zRunTest


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

Branch: refs/heads/master
Commit: 334dba5978ccd925417fb70ab36fc126760149db
Parents: eb893ba
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Thu Dec 15 15:29:07 2016 +0800
Committer: Lee moon soo <moon@apache.org>
Committed: Thu Jan 5 18:06:19 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/zeppelin/socket/NotebookServer.java | 8 +++++++-
 .../org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java   | 2 ++
 zeppelin-server/src/test/resources/log4j.properties          | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/334dba59/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
index b3bd0a3..878bad8 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
@@ -1966,7 +1966,13 @@ public class NotebookServer extends WebSocketServlet
       }
 
       if (job.isTerminated()) {
-        LOG.info("Job {} is finished", job.getId());
+        if (job.getStatus() == Status.FINISHED) {
+          LOG.info("Job {} is finished successfully, status: {}", job.getId(), job.getStatus());
+        } else {
+          LOG.warn("Job {} is finished, status: {}, exception: {}, result: {}" , job.getId(),
+              job.getStatus(), job.getException(), job.getReturn());
+        }
+
         try {
           //TODO(khalid): may change interface for JobListener and pass subject from interpreter
           note.persist(job instanceof Paragraph ? ((Paragraph) job).getAuthenticationInfo()
: null);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/334dba59/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
index 52018d6..5e1e355 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java
@@ -342,6 +342,8 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
         waitForFinish(p0);
         assertEquals(Status.FINISHED, p0.getStatus());
 
+        // z.run is not blocking call. So p1 may not be finished when p0 is done.
+        waitForFinish(p1);
         note.run(p2.getId());
         waitForFinish(p2);
         assertEquals(Status.FINISHED, p2.getStatus());

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/334dba59/zeppelin-server/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/resources/log4j.properties b/zeppelin-server/src/test/resources/log4j.properties
index 5007390..041daf0 100644
--- a/zeppelin-server/src/test/resources/log4j.properties
+++ b/zeppelin-server/src/test/resources/log4j.properties
@@ -43,4 +43,4 @@ log4j.logger.DataNucleus.Datastore=ERROR
 # Log all JDBC parameters
 log4j.logger.org.hibernate.type=ALL
 
-log4j.logger.org.apache.zeppelin.interpreter.remote.RemoteInterpreter=DEBUG
+log4j.logger.org.apache.zeppelin.interpreter=DEBUG
\ No newline at end of file


Mime
View raw message