[ 
https://issues.apache.org/jira/browse/HADOOP-3740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612759#action_12612759
 ] 

Amar Kamat commented on HADOOP-3740:
------------------------------------

I had an offline discussion with Alejandro. So the problem seems to be of 
_resource constraints_. Here the resource is some service that requires a 
'license'. This falls into a broad category of resource aware schedulers. So 
ideally one should make use of some scheduler which is resource aware. As that 
might take time we can now have a framework support for such cases where the 
resources that the tasks depend upon is centrally/globally controlled. So I 
think for now we can do what Alejandro suggested. 

Alejandro, 
Today, we dont discriminate between tasks but now we will have to do it. A 
simpler approach would be to do what the scheduler does but before giving the 
task in  {{JobInProgress.findTaskFromList()}} and 
{{JobInProgress.findSpeculativeTask()}} just check if the resource is available 
or not. If yes then _return_ else _ignore and continue_. Thus we will be able 
to find out an _appropriate_ task in one scheduling cycle. Updating the license 
server can be done in {{JobInProgress.updateTaskStatus()}} upon task-attempt 
completion (success/failure/kill).

Thoughts?

> Make JobInProgress pluggable
> ----------------------------
>
>                 Key: HADOOP-3740
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3740
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: mapred
>         Environment: all
>            Reporter: Alejandro Abdelnur
>
> By allowing a pluggable JobInProgess it will be possible for provide 
> implementations that can do a sophisticated task provisioning to the 
> JobTracker. 
> For example, by providing alternate implementations of the 
> {{obtainNewMapTask}}, {{obtainNewReduceTask}} and {{updateTaskInProgress}} it 
> would be possible to implement a license server that allows to throttle use 
> of external resources (ie webservices, databases) so at any given time there 
> are not more than N tasks using a given resource. For this a task could be 
> tagged with the names of external resources and the license server would keep 
> track of the tasks running per tag, if the counter reaches zero then the 
> {{obtainNew*Task}} method could return NULL instead of a task.
>  

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

Reply via email to