You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ma...@apache.org on 2016/03/17 17:45:37 UTC

git commit: updated refs/heads/trunk to 5a04dc5

Repository: giraph
Updated Branches:
  refs/heads/trunk 4170eeb05 -> 5a04dc554


GIRAPH-1039: Fix stopping jmap histo thread

Summary: Currently if jmap histo frequency is set to long period we end up stuck in the end of the job for a long time waiting on jmap histo thread

Test Plan: Ran a job with long jmap frequency - verified it gets stuck without this change and finishes fine with it

Differential Revision: https://reviews.facebook.net/D50085


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

Branch: refs/heads/trunk
Commit: 5a04dc554ef53ddc39895a9211286b9fb2e65586
Parents: 4170eeb
Author: Maja Kabiljo <ma...@fb.com>
Authored: Tue Nov 3 11:01:22 2015 -0800
Committer: Maja Kabiljo <ma...@fb.com>
Committed: Thu Mar 17 09:44:44 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/giraph/utils/JMapHistoDumper.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/5a04dc55/giraph-core/src/main/java/org/apache/giraph/utils/JMapHistoDumper.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/utils/JMapHistoDumper.java b/giraph-core/src/main/java/org/apache/giraph/utils/JMapHistoDumper.java
index 4282d35..a68f6c4 100644
--- a/giraph-core/src/main/java/org/apache/giraph/utils/JMapHistoDumper.java
+++ b/giraph-core/src/main/java/org/apache/giraph/utils/JMapHistoDumper.java
@@ -42,7 +42,7 @@ public class JMapHistoDumper implements MasterObserver, WorkerObserver {
   /** The jmap printing thread */
   private Thread thread;
   /** Halt jmap thread */
-  private boolean stop = false;
+  private volatile boolean stop = false;
 
   @Override
   public void preLoad() {
@@ -70,6 +70,7 @@ public class JMapHistoDumper implements MasterObserver, WorkerObserver {
   private void joinJMapThread() {
     stop = true;
     try {
+      thread.interrupt();
       thread.join(sleepMillis + 5000);
     } catch (InterruptedException e) {
       LOG.error("Failed to join jmap thread");
@@ -89,7 +90,7 @@ public class JMapHistoDumper implements MasterObserver, WorkerObserver {
           try {
             Thread.sleep(sleepMillis);
           } catch (InterruptedException e) {
-            LOG.warn("JMap histogram sleep interrupted", e);
+            LOG.info("JMap histogram sleep interrupted", e);
           }
         }
       }