[ 
https://issues.apache.org/jira/browse/HAMA-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098425#comment-15098425
 ] 

Behroz Sikander commented on HAMA-900:
--------------------------------------

I gave it a try and apparently things are looking ok. Here is the commit
https://github.com/bsikander/hama/commit/323323c7a971d05f517b421df68655cd89948049

Initially, I tried to use the taskId for round robin allocation because taskId 
was initialized with 0 and incremented with each new task. But it was not 
always like that. Here is the function from TaskInProgress.
private TaskAttemptID computeTaskId() {
    TaskAttemptID taskid = null;
    if (nextTaskId < (MAX_TASK_EXECS + maxTaskAttempts)) {
      int attemptId = job.getNumRestarts() * NUM_ATTEMPTS_PER_RESTART
          + nextTaskId;
      taskid = new TaskAttemptID(id, attemptId);
      ++nextTaskId;
   ....
  }

Then I tried to find the Groom with minimum tasks. This makes sure that the 
less loaded Groom gets the new task. This implemenation first it tries to 
allocate the tasks which have the data (data locality- I have not changed 
anything in it, it is similar to BestEffort), if the list of tasks with data is 
NULL then my function (findGroomWithMinimumTasks) runs and allocates according 
to round robin. 

Question: 
1- How can I generate the Jar files from current Hama source code ? I want to 
copy the new jars to cluster and test their. (mvn package ?)
2- Should we also keep the allocation based on data locality in RoundRobin ?
3- In JobInProgress, the assignment of concrete implementation of Interface is 
hardcoded
Class<?> taskAllocatorClass = conf.getClass(Constants.TASK_ALLOCATOR_CLASS,
        RoundRobinTaskAllocator.class, TaskAllocationStrategy.class);

Is their any existing example in code which shows how to add a new 
configuration in hama-default.xml ?


> Rotation task scheduler
> -----------------------
>
>                 Key: HAMA-900
>                 URL: https://issues.apache.org/jira/browse/HAMA-900
>             Project: Hama
>          Issue Type: New Feature
>          Components: bsp core
>            Reporter: Edward J. Yoon
>
> To spread tasks widely, I need a FIFO job scheduler that assign tasks one at 
> a time in rotation of groom servers (a method of dealing cards).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to