hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1399943 - in /hama/trunk: CHANGES.txt core/src/main/java/org/apache/hama/bsp/BSPJobClient.java core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java
Date Fri, 19 Oct 2012 01:28:49 GMT
Author: edwardyoon
Date: Fri Oct 19 01:28:49 2012
New Revision: 1399943

URL: http://svn.apache.org/viewvc?rev=1399943&view=rev
Log:
Scheduler kills job too silently when out of slots

Modified:
    hama/trunk/CHANGES.txt
    hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java

Modified: hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hama/trunk/CHANGES.txt?rev=1399943&r1=1399942&r2=1399943&view=diff
==============================================================================
--- hama/trunk/CHANGES.txt (original)
+++ hama/trunk/CHANGES.txt Fri Oct 19 01:28:49 2012
@@ -8,6 +8,7 @@ Release 0.6 (unreleased changes)
 
   BUG FIXES
 
+   HAMA-613: Scheduler kills job too silently when out of slots (Yuesheng Hu via edwardyoon)
    HAMA-647: Make the input spliter robustly (Yuesheng Hu via edwardyoon)
    HAMA-635: Number of vertices value is inconsistent among tasks (Yuesheng Hu via tjungblut)
    HAMA-633: Fix CI Failures (tjungblut)

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java?rev=1399943&r1=1399942&r2=1399943&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java Fri Oct 19 01:28:49
2012
@@ -319,9 +319,10 @@ public class BSPJobClient extends Config
     short replication = (short) job.getInt("bsp.submit.replication", 10);
 
     ClusterStatus clusterStatus = getClusterStatus(true);
-    int maxTasks = clusterStatus.getMaxTasks();
+    int maxTasks = clusterStatus.getMaxTasks() - clusterStatus.getTasks();
     if (maxTasks < job.getNumBspTask()) {
-      job.setNumBspTask(maxTasks);
+      LOG.error("Job failed! No more taks slots available");
+      System.exit(-1);
     }
 
     // only create the splits if we have an input

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java?rev=1399943&r1=1399942&r2=1399943&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java Fri Oct 19 01:28:49
2012
@@ -77,6 +77,8 @@ public class LocalBSPRunner implements J
 
   // this is used for not-input driven job
   private final int maxTasks;
+  // currently running tasks
+  private final int totalTasks = 0;
 
   public LocalBSPRunner(Configuration conf) throws IOException {
     super();
@@ -159,7 +161,7 @@ public class LocalBSPRunner implements J
 
   @Override
   public ClusterStatus getClusterStatus(boolean detailed) throws IOException {
-    return new ClusterStatus(maxTasks, maxTasks, maxTasks, State.RUNNING);
+    return new ClusterStatus(maxTasks, totalTasks, maxTasks, State.RUNNING);
   }
 
   @Override



Mime
View raw message