zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject [zeppelin] branch master updated: [ZEPPELIN-4284] Fix cluster metadata interpreter offline timeout calculation error
Date Sat, 17 Aug 2019 15:18:33 GMT
This is an automated email from the ASF dual-hosted git repository.

liuxun 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 c917204  [ZEPPELIN-4284] Fix cluster metadata interpreter offline timeout calculation
error
c917204 is described below

commit c917204371debc160c1d7c627deac09466b142b6
Author: Xun Liu <liuxun@apache.org>
AuthorDate: Wed Jul 31 15:35:49 2019 +0800

    [ZEPPELIN-4284] Fix cluster metadata interpreter offline timeout calculation error
    
    ### What is this PR for?
    The interpreter heartbeat time unit recorded in the cluster metadata is seconds.
    The timeout calculation formula was incorrectly used in milliseconds.
    
    ### What type of PR is it?
    Bug Fix
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-4284
    
    ### How should this be tested?
    [CI Pass](https://travis-ci.org/liuxunorg/zeppelin/builds/572129364)
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update?
    * Is there breaking changes for older versions?
    * Does this needs documentation?
    
    Author: Xun Liu <liuxun@apache.org>
    
    Closes #3426 from liuxunorg/ZEPPELIN-4284 and squashes the following commits:
    
    8d755e130 [Xun Liu] [ZEPPELIN-4284] Fix cluster metadata interpreter offline timeout calculation
error
---
 .../src/main/java/org/apache/zeppelin/cluster/ClusterMonitor.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/cluster/ClusterMonitor.java
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/cluster/ClusterMonitor.java
index cb8fbaf..cd42ab5 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/cluster/ClusterMonitor.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/cluster/ClusterMonitor.java
@@ -157,7 +157,7 @@ public class ClusterMonitor {
         if (heartbeat instanceof LocalDateTime) {
           LocalDateTime dHeartbeat = (LocalDateTime) heartbeat;
           Duration duration = Duration.between(dHeartbeat, now);
-          long timeInterval = duration.getSeconds();
+          long timeInterval = duration.getSeconds() * 1000; // Convert to milliseconds
           if (timeInterval > heartbeatTimeout) {
             // Set the metadata for the heartbeat timeout to offline
             // Cannot delete metadata


Mime
View raw message