Repository: giraph
Updated Branches:
  refs/heads/trunk d3cdd1138 -> 4bb1d3e17


GIRAPH-960: Max task attempts should be 1 and not 0.

Summary: 0 is an invalid number that may not work on some Hadoop distributions

Test Plan: Ran a job and failed a task.

Reviewers: pavanka.26, maja.kabiljo

Reviewed By: maja.kabiljo

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


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

Branch: refs/heads/trunk
Commit: 4bb1d3e17220b903b102d64a62fdb04f2bffa88a
Parents: d3cdd11
Author: Avery Ching <[email protected]>
Authored: Mon Oct 27 16:12:01 2014 -0700
Committer: Avery Ching <[email protected]>
Committed: Mon Oct 27 17:47:25 2014 -0700

----------------------------------------------------------------------
 giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/4bb1d3e1/giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java 
b/giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java
index 11ae7fc..79a145f 100644
--- a/giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java
+++ b/giraph-core/src/main/java/org/apache/giraph/job/GiraphJob.java
@@ -218,14 +218,14 @@ public class GiraphJob {
     giraphConfiguration.setBoolean("mapreduce.job.user.classpath.first", true);
 
     // If the checkpoint frequency is 0 (no failure handling), set the max
-    // tasks attempts to be 0 to encourage faster failure of unrecoverable jobs
+    // tasks attempts to be 1 to encourage faster failure of unrecoverable jobs
     if (giraphConfiguration.getCheckpointFrequency() == 0) {
       int oldMaxTaskAttempts = giraphConfiguration.getMaxTaskAttempts();
-      giraphConfiguration.setMaxTaskAttempts(0);
+      giraphConfiguration.setMaxTaskAttempts(1);
       if (LOG.isInfoEnabled()) {
         LOG.info("run: Since checkpointing is disabled (default), " +
             "do not allow any task retries (setting " +
-            GiraphConstants.MAX_TASK_ATTEMPTS.getKey() + " = 0, " +
+            GiraphConstants.MAX_TASK_ATTEMPTS.getKey() + " = 1, " +
             "old value = " + oldMaxTaskAttempts + ")");
       }
     }

Reply via email to