hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1695219 - in /hama/trunk: core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java yarn/src/main/java/org/apache/hama/bsp/ApplicationMaster.java yarn/src/main/java/org/apache/hama/bsp/YARNBSPJob.java
Date Tue, 11 Aug 2015 06:39:21 GMT
Author: minho
Date: Tue Aug 11 06:39:21 2015
New Revision: 1695219

URL: http://svn.apache.org/r1695219
Log:
HAMA-963. Fix the problem that occurs ArrayIndexOutOfBoundsException

Modified:
    hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java
    hama/trunk/yarn/src/main/java/org/apache/hama/bsp/ApplicationMaster.java
    hama/trunk/yarn/src/main/java/org/apache/hama/bsp/YARNBSPJob.java

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java?rev=1695219&r1=1695218&r2=1695219&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java Tue
Aug 11 06:39:21 2015
@@ -241,7 +241,6 @@ public class ZooKeeperSyncClientImpl ext
     String jobRegisterKey = constructKey(jobId, "peers");
     Stat stat = null;
 
-    LOG.info("TaskAttemptID : " + taskId);
     while (stat != null) {
       try {
         stat = zk.exists(jobRegisterKey, false);

Modified: hama/trunk/yarn/src/main/java/org/apache/hama/bsp/ApplicationMaster.java
URL: http://svn.apache.org/viewvc/hama/trunk/yarn/src/main/java/org/apache/hama/bsp/ApplicationMaster.java?rev=1695219&r1=1695218&r2=1695219&view=diff
==============================================================================
--- hama/trunk/yarn/src/main/java/org/apache/hama/bsp/ApplicationMaster.java (original)
+++ hama/trunk/yarn/src/main/java/org/apache/hama/bsp/ApplicationMaster.java Tue Aug 11 06:39:21
2015
@@ -85,7 +85,10 @@ public class ApplicationMaster implement
   private Counters globalCounter = new Counters();
   private BSPJobClient.RawSplit[] splits;
 
+  // Hama job id
   private BSPJobID jobId;
+  // Partiion id
+  private static AtomicInteger ai = new AtomicInteger(-1);
 
   // SyncServer for Zookeeper
   private SyncServer syncServer;
@@ -723,7 +726,7 @@ public class ApplicationMaster implement
       vargs.add(BSPRunner.class.getCanonicalName());
 
       vargs.add(jobId.getJtIdentifier());
-      vargs.add(Long.toString(container.getId().getContainerId()));
+      vargs.add(Integer.toString(ai.incrementAndGet()));
       vargs.add(new Path(jobFile).makeQualified(fs.getUri(),
           fs.getWorkingDirectory()).toString());
 
@@ -945,7 +948,6 @@ public class ApplicationMaster implement
   public Task getTask(TaskAttemptID taskid) throws IOException {
     BSPJobClient.RawSplit assignedSplit = null;
     String splitName = NullInputFormat.NullInputSplit.class.getName();
-    // String splitName = NullInputSplit.class.getCanonicalName();
     if (splits != null) {
       assignedSplit = splits[taskid.id];
       splitName = assignedSplit.getClassName();

Modified: hama/trunk/yarn/src/main/java/org/apache/hama/bsp/YARNBSPJob.java
URL: http://svn.apache.org/viewvc/hama/trunk/yarn/src/main/java/org/apache/hama/bsp/YARNBSPJob.java?rev=1695219&r1=1695218&r2=1695219&view=diff
==============================================================================
--- hama/trunk/yarn/src/main/java/org/apache/hama/bsp/YARNBSPJob.java (original)
+++ hama/trunk/yarn/src/main/java/org/apache/hama/bsp/YARNBSPJob.java Tue Aug 11 06:39:21
2015
@@ -74,6 +74,7 @@ public class YARNBSPJob extends BSPJob {
   public void submit() throws IOException, InterruptedException {
     // If Constants.MAX_TASKS_PER_JOB is null, calculates the max tasks based on resource
status.
     this.getConfiguration().setInt(Constants.MAX_TASKS_PER_JOB, getMaxTasks());
+
     LOG.debug("MaxTasks: " + this.getConfiguration().get(Constants.MAX_TASKS_PER_JOB));
     
     RunningJob submitJobInternal = submitClient.submitJobInternal(this,



Mime
View raw message