hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon" <edwardy...@apache.org>
Subject Re: small cleanup patch
Date Thu, 11 Nov 2010 09:14:59 GMT
Regarding that "report.setGroomServer(status.getGroomName());", I'm
not sure, but it should not be removed. When some node failure occurs,
they can be re-assigned to other GroomServers.

I moved updateTaskStatuses(status); line to the bottom of action
adding part. and committed rest lines. :)

On Thu, Nov 11, 2010 at 10:57 AM, Filipe David Manana
<fdmanana@apache.org> wrote:
> Hi
> Do you agree? The odd part is the line:
>
> report.setGroomServer(status.getGroomName());
>
> All tests pass without it.
>
>
> diff --git a/src/java/org/apache/hama/bsp/BSPMaster.java
> b/src/java/org/apache/hama/bsp/BSPMaster.java
> index 1e0aef8..aca690e 100644
> --- a/src/java/org/apache/hama/bsp/BSPMaster.java
> +++ b/src/java/org/apache/hama/bsp/BSPMaster.java
> @@ -233,8 +233,7 @@ public class BSPMaster implements
> JobSubmissionProtocol, InterTrackerProtocol,
>   public static BSPMaster startTracker(HamaConfiguration conf, String
> identifier)
>       throws IOException, InterruptedException {
>
> -    BSPMaster result = null;
> -    result = new BSPMaster(conf, identifier);
> +    BSPMaster result = new BSPMaster(conf, identifier);
>     result.taskScheduler.setGroomServerManager(result);
>
>     return result;
> @@ -247,16 +246,12 @@ public class BSPMaster implements
> JobSubmissionProtocol, InterTrackerProtocol,
>     return NetUtils.createSocketAddr(hamaMasterStr, defaultPort);
>   }
>
> -  private static SimpleDateFormat getDateFormat() {
> -    return new SimpleDateFormat("yyyyMMddHHmm");
> -  }
> -
>   /**
>    *
>    * @return
>    */
>   private static String generateNewIdentifier() {
> -    return getDateFormat().format(new Date());
> +    return new SimpleDateFormat("yyyyMMddHHmm").format(new Date());
>   }
>
>   public void offerService() throws InterruptedException, IOException {
> @@ -404,7 +399,6 @@ public class BSPMaster implements
> JobSubmissionProtocol, InterTrackerProtocol,
>   void updateTaskStatuses(GroomServerStatus status) {
>     for (Iterator<TaskStatus> it = status.taskReports(); it.hasNext();) {
>       TaskStatus report = it.next();
> -      report.setGroomServer(status.getGroomName());
>       String taskId = report.getTaskId();
>       TaskInProgress tip = (TaskInProgress) taskidToTIPMap.get(taskId);
>
>
>
>
>
> --
> Filipe David Manana,
> fdmanana@gmail.com, fdmanana@apache.org
>
> "Reasonable men adapt themselves to the world.
>  Unreasonable men adapt the world to themselves.
>  That's why all progress depends on unreasonable men."
>



-- 
Best Regards, Edward J. Yoon
edwardyoon@apache.org
http://blog.udanax.org

Mime
View raw message