hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Putta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-2759) TaskTrackerAction should follow Open Closed Principle
Date Mon, 01 Aug 2011 08:59:09 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-2759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073467#comment-13073467

Rajesh Putta commented on MAPREDUCE-2759:

switch (actionType) {
    case LAUNCH_TASK:
        action = new LaunchTaskAction();
    case KILL_TASK:
        action = new KillTaskAction();
    case KILL_JOB:
        action = new KillJobAction();
        action = new ReinitTrackerAction();
    case COMMIT_TASK:
        action = new CommitTaskAction();
In the above case, for every action that are going to be added in the future the number of
cases increases.

> TaskTrackerAction should follow Open Closed Principle
> -----------------------------------------------------
>                 Key: MAPREDUCE-2759
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2759
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: tasktracker
>    Affects Versions: 0.23.0
>         Environment: NA
>            Reporter: Rajesh Putta
>            Priority: Minor
> In the class TaskTrackerAction  there are fixed actions or directions specified from
the Job Tracker to the Task Tracker.So if in the future if some more actions are specified
from the Job Tracker to Task Tracker,Current implementation is breaking Open Closed Principle(Open
for extension,closed for modification).As the number of actions increases in the future, the
code need to be modified to incorporate the actions.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message