|
Minor comments:
Long term: It would be really great to use the TaskInProgressStatus.TaskInProgressStatusType to maintain the TIP's state rather than all the booleans... Super minor nit: I'd prefer to rename TaskInProgressStatusType to just Status! smile
Clients may be interested in names of blacklisted trackers as well. I think -list-trackers should list all by default and perhaps take an argument to list blacklisted/active ones ?
Thanks Arun/Sharad for looking at this. I have incorporated the comments.
1) Made TaskInProgressStatusType a separate class all by itself and called it TIPStatus 2) Factored TaskInProgressStatus functionality into TaskReport since that is where it is needed 3) Added a new getClusterStatus method that takes a boolean argument and depending on whether it is true, sets the task tracker names as well. If false, only counts of blacklisted/active trackers are set (as is the behavior today). I did this since I wanted to avoid iterations over the tasktracker list for every call to assignTasks in CapacityScheduler, for example. looks good.
Please take a note to document the new commands to the commands manual. All test cases and test-patch passed. I committed this.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Provided the following new command line options in the JobClient:
1) -list-trackers : display the list of active trackers in the cluster
2) -list-attempt-ids <jobId> <task-type> <task-state> : displays the list of tasks for a given job of a give type (like map or reduce) currently in a particular state (running or completed).