You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Amar Kamat (JIRA)" <ji...@apache.org> on 2010/01/04 15:51:54 UTC

[jira] Created: (MAPREDUCE-1353) Remove JobInProgress (back?) reference from TaskInProgress

Remove JobInProgress (back?) reference from TaskInProgress
----------------------------------------------------------

                 Key: MAPREDUCE-1353
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1353
             Project: Hadoop Map/Reduce
          Issue Type: Improvement
          Components: jobtracker
            Reporter: Amar Kamat


Looks like TaskInProgress can get rid of JobInProgress back-reference if the values it requires from the JobInProgress are passed as parameters. 

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


[jira] Commented: (MAPREDUCE-1353) Remove JobInProgress (back?) reference from TaskInProgress

Posted by "Amar Kamat (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796205#action_12796205 ] 

Amar Kamat commented on MAPREDUCE-1353:
---------------------------------------

TaskInProgress requires few getter-like information from JobInProgress which can be passed as (method) arguments. By doing this we can get rid of the JobInProgress back-reference in TaskInProgress and lower the effect of a TIP reference leak atleast (see MAPREDUCE-1316).

Following are the methods where the JobInProgress object is used by TaskInProgress

- _shouldClose()_ : Calls job.getStatus().getRunState()  which can be passed as a parameter. 
- _updateStatus()_ : Requires job.hasSpeculativeMaps()/job.hasSpeculativeMaps() which can be passed as arguments. 
- _updateStatus()_ : Called from JobInProgress. Calls job.updateStatistics(oldProgRate, currProgRate, isMapTask()) which can be called by JobInProgress after the call to _updateStatus()_ something like 

{code}
float oldProgRate = tip.getOldProgress();
tip.updateStatus(taskstatus, hasSpeculativeMaps(), hasSpeculativeReduces());
float currProgRate = tip.getOldProgress();
updateStatistics(oldProgRate, currProgRate, isMapTask()); // internal call
{code}

- _canBeSpeculated()_ : Requires job.getRunningTaskStatistics(isMapTask()) and job.getSlowTaskThreshold() which can be passed as an argument.
- _getTaskToRun()_ : Requires job.getNumRestarts() which can be passed as an argument.
 
 Also TaskInProgress has a _getJob()_ api used only by the JobTracker either for JobID or for JobInProgress. JobTracker can very well use its own _getJob()_ i.e
{code}
JobID id = tip.getJob().getJobID()
{code}
 can be replaced by 
{code}
JobID id = tip. getTIPId().getJobID();
{code}

   and
{code}
JobInProgress jip = tip.getJob() 
{code}
can be replaced by 
{code}
JobInProgress jip = getJob(tip.getTIPId().getJobID());
{code}

Thoughts?

> Remove JobInProgress (back?) reference from TaskInProgress
> ----------------------------------------------------------
>
>                 Key: MAPREDUCE-1353
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1353
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: jobtracker
>    Affects Versions: 0.22.0
>            Reporter: Amar Kamat
>            Assignee: Amar Kamat
>             Fix For: 0.22.0
>
>
> Looks like TaskInProgress can get rid of JobInProgress back-reference if the values it requires from the JobInProgress are passed as parameters. 

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


[jira] Updated: (MAPREDUCE-1353) Remove JobInProgress (back?) reference from TaskInProgress

Posted by "Amar Kamat (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amar Kamat updated MAPREDUCE-1353:
----------------------------------

    Affects Version/s: 0.22.0
        Fix Version/s: 0.22.0
             Assignee: Amar Kamat

> Remove JobInProgress (back?) reference from TaskInProgress
> ----------------------------------------------------------
>
>                 Key: MAPREDUCE-1353
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1353
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: jobtracker
>    Affects Versions: 0.22.0
>            Reporter: Amar Kamat
>            Assignee: Amar Kamat
>             Fix For: 0.22.0
>
>
> Looks like TaskInProgress can get rid of JobInProgress back-reference if the values it requires from the JobInProgress are passed as parameters. 

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