hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amar Kamat (JIRA)" <j...@apache.org>
Subject [jira] Created: (MAPREDUCE-731) Factor out the timer code in jobtracker and add a callback interface
Date Wed, 08 Jul 2009 05:30:16 GMT
Factor out the timer code in jobtracker and add a callback interface

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

I can see LostTracker, ExpiryJobs and ExpiryLaunchingTasks code in the jobtracker which essentially
do the same thing. I see a better way of doing this by having a time utility which simply
waits for the object to expire. Once expired, it invoked the master via the callback interface.
So the jobtracker code would like
void expire(ExpiryItem item) {
  if (item instanceOf JobInProgress) {
    // expire job
  } else if (item instanceOf TaskTracker) {
    // expire tracker ... i.e lost tracker
  } else if (item instanceOf TaskAttempt) {
     // expire attempt

  // create a time thread for each code piece 
  losttracker-timer = new Timer();
  expiry-timer = new Timer();
  attempt-timer = new Timer();

  // any special logic should be implemented before adding to the expiry queue.

JobInProgress, TaskAttempt and TaskTracker all should implement ExpiryItem interface (which
is nothing but getTime() or something similar). 

This will help us in 2 ways
1) Maintenance : 
2) Testing :

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

View raw message