Repository: giraph
Updated Branches:
  refs/heads/trunk 984f45efe -> 833ccb78e


GIRAPH-1115: Move UncaughtExceptionHandler setup to GraphTaskManager

Test Plan: Ran a job which isn't using GraphMapper and verified exception 
handler was set properly

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


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

Branch: refs/heads/trunk
Commit: 833ccb78e61f01d1525f6c6af6757ad573d8a78c
Parents: 984f45e
Author: Maja Kabiljo <majakabi...@fb.com>
Authored: Mon Sep 19 12:26:49 2016 -0700
Committer: Maja Kabiljo <majakabi...@fb.com>
Committed: Mon Sep 19 12:28:14 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/giraph/graph/GraphMapper.java       | 4 ----
 .../src/main/java/org/apache/giraph/graph/GraphTaskManager.java  | 2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/833ccb78/giraph-core/src/main/java/org/apache/giraph/graph/GraphMapper.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/graph/GraphMapper.java 
b/giraph-core/src/main/java/org/apache/giraph/graph/GraphMapper.java
index 952249a..aa4ce7b 100644
--- a/giraph-core/src/main/java/org/apache/giraph/graph/GraphMapper.java
+++ b/giraph-core/src/main/java/org/apache/giraph/graph/GraphMapper.java
@@ -55,10 +55,6 @@ public class GraphMapper<I extends WritableComparable, V 
extends Writable,
     graphTaskManager = new GraphTaskManager<I, V, E>(context);
     graphTaskManager.setup(
       DistributedCache.getLocalCacheArchives(context.getConfiguration()));
-
-    // Setting the default handler for uncaught exceptions.
-    Thread.setDefaultUncaughtExceptionHandler(
-        graphTaskManager.createUncaughtExceptionHandler());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/giraph/blob/833ccb78/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
----------------------------------------------------------------------
diff --git 
a/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java 
b/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
index 6a7028a..0f313ce 100644
--- a/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
+++ b/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
@@ -224,6 +224,8 @@ end[PURE_YARN]*/
     context.setStatus("setup: Beginning worker setup.");
     Configuration hadoopConf = context.getConfiguration();
     conf = new ImmutableClassesGiraphConfiguration<I, V, E>(hadoopConf);
+    // Setting the default handler for uncaught exceptions.
+    
Thread.setDefaultUncaughtExceptionHandler(createUncaughtExceptionHandler());
     setupMapperObservers();
     initializeJobProgressTracker();
     // Write user's graph types (I,V,E,M) back to configuration parameters so

Reply via email to