[
https://issues.apache.org/jira/browse/MAPREDUCE-731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Owen O'Malley updated MAPREDUCE-731:
------------------------------------
Description: I can see LostTracker, ExpiryJobs and ExpiryLaunchingTasks
code in the jobtracker which essentially do the same thing. (was: 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
{code}
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.
}
{code}
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 :
Thoughts?)
Please don't put solutions into the Jira descriptions. They are mailed out each
time. Put proposed solutions into the comments.
{quote}
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
{code}
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.
}
{code}
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 :
Thoughts?
{quote}
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.