FAQ
Remove dead code block in JobInProgress.completedTask
------------------------------------------------------

Key: HADOOP-2726
URL: https://issues.apache.org/jira/browse/HADOOP-2726
Project: Hadoop Core
Issue Type: Improvement
Affects Versions: 0.15.0
Reporter: Arun C Murthy
Fix For: 0.17.0


Since the taskCommitThread ensures that one and only one task of a given TIP is marked as SUCCEEDED, we don't need the code block in JobInProgress.completedTask which checks if the TIP is complete and then just marks the task as complete:

{noformat}
// Sanity check: is the TIP already complete?
if (tip.isComplete()) {
// Mark this task as KILLED
tip.alreadyCompletedTask(taskid);

// Let the JobTracker cleanup this taskid if the job isn't running
if (this.status.getRunState() != JobStatus.RUNNING) {
jobtracker.markCompletedTaskAttempt(status.getTaskTracker(), taskid);
}
return false;
}
{noformat}


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Arun C Murthy (JIRA) at Jan 29, 2008 at 4:42 am
    [ https://issues.apache.org/jira/browse/HADOOP-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Arun C Murthy updated HADOOP-2726:
    ----------------------------------

    Component/s: mapred
    Remove dead code block in JobInProgress.completedTask
    ------------------------------------------------------

    Key: HADOOP-2726
    URL: https://issues.apache.org/jira/browse/HADOOP-2726
    Project: Hadoop Core
    Issue Type: Improvement
    Components: mapred
    Affects Versions: 0.15.0
    Reporter: Arun C Murthy
    Fix For: 0.17.0


    Since the taskCommitThread ensures that one and only one task of a given TIP is marked as SUCCEEDED, we don't need the code block in JobInProgress.completedTask which checks if the TIP is complete and then just marks the task as complete:
    {noformat}
    // Sanity check: is the TIP already complete?
    if (tip.isComplete()) {
    // Mark this task as KILLED
    tip.alreadyCompletedTask(taskid);
    // Let the JobTracker cleanup this taskid if the job isn't running
    if (this.status.getRunState() != JobStatus.RUNNING) {
    jobtracker.markCompletedTaskAttempt(status.getTaskTracker(), taskid);
    }
    return false;
    }
    {noformat}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Devaraj Das (JIRA) at Jan 29, 2008 at 4:52 am
    [ https://issues.apache.org/jira/browse/HADOOP-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563379#action_12563379 ]

    Devaraj Das commented on HADOOP-2726:
    -------------------------------------

    +1
    Remove dead code block in JobInProgress.completedTask
    ------------------------------------------------------

    Key: HADOOP-2726
    URL: https://issues.apache.org/jira/browse/HADOOP-2726
    Project: Hadoop Core
    Issue Type: Improvement
    Components: mapred
    Affects Versions: 0.15.0
    Reporter: Arun C Murthy
    Fix For: 0.17.0


    Since the taskCommitThread ensures that one and only one task of a given TIP is marked as SUCCEEDED, we don't need the code block in JobInProgress.completedTask which checks if the TIP is complete and then just marks the task as complete:
    {noformat}
    // Sanity check: is the TIP already complete?
    if (tip.isComplete()) {
    // Mark this task as KILLED
    tip.alreadyCompletedTask(taskid);
    // Let the JobTracker cleanup this taskid if the job isn't running
    if (this.status.getRunState() != JobStatus.RUNNING) {
    jobtracker.markCompletedTaskAttempt(status.getTaskTracker(), taskid);
    }
    return false;
    }
    {noformat}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Robert Chansler (JIRA) at Mar 25, 2008 at 3:08 am
    [ https://issues.apache.org/jira/browse/HADOOP-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Robert Chansler updated HADOOP-2726:
    ------------------------------------

    Fix Version/s: (was: 0.17.0)
    Remove dead code block in JobInProgress.completedTask
    ------------------------------------------------------

    Key: HADOOP-2726
    URL: https://issues.apache.org/jira/browse/HADOOP-2726
    Project: Hadoop Core
    Issue Type: Improvement
    Components: mapred
    Affects Versions: 0.15.0
    Reporter: Arun C Murthy

    Since the taskCommitThread ensures that one and only one task of a given TIP is marked as SUCCEEDED, we don't need the code block in JobInProgress.completedTask which checks if the TIP is complete and then just marks the task as complete:
    {noformat}
    // Sanity check: is the TIP already complete?
    if (tip.isComplete()) {
    // Mark this task as KILLED
    tip.alreadyCompletedTask(taskid);
    // Let the JobTracker cleanup this taskid if the job isn't running
    if (this.status.getRunState() != JobStatus.RUNNING) {
    jobtracker.markCompletedTaskAttempt(status.getTaskTracker(), taskid);
    }
    return false;
    }
    {noformat}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedJan 29, '08 at 4:42a
activeMar 25, '08 at 3:08a
posts4
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Robert Chansler (JIRA): 4 posts

People

Translate

site design / logo © 2022 Grokbase