[ 
https://issues.apache.org/jira/browse/MAPREDUCE-5583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14343756#comment-14343756
 ] 

Jason Lowe commented on MAPREDUCE-5583:
---------------------------------------

bq. So the return value for requestLimits.put(newReqLimit, newReqLimit) can 
always be null or the same as newReqLimit (event in numOfContainers), so 
checking for "oldReqLimit.getNumContainers() < limit" sounds unnecessary to me.

The return value from requestLimits.put will be the previously stored value 
requested limit which is not necessarily newReqLimit if it's not null.  If a 
job with 3 tasks has a limit of 1 task and 1 is already running then the 
current ask is 0.  As that task completes the ask will go from 0 to 1 since we 
can now run another task.  In that case oldReqLimit.getNumContainers == 0 and 
newReqLimit.getNumContainers() == 1, so they are not the same.

The intent of this check is to re-send the ask if the limit is being raised.  
If we don't re-send the ask when the limit goes up then the RM may fail to 
allocate more containers when we need them which would result in a hang.  (AM 
thinks it's asking, RM thinks the AM doesn't want any.)

> Ability to limit running map and reduce tasks
> ---------------------------------------------
>
>                 Key: MAPREDUCE-5583
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5583
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: mr-am, mrv2
>    Affects Versions: 0.23.9, 2.1.1-beta
>            Reporter: Jason Lowe
>            Assignee: Jason Lowe
>         Attachments: MAPREDUCE-5583-branch2.4.1.patch, 
> MAPREDUCE-5583v1.patch, MAPREDUCE-5583v2.patch, MAPREDUCE-5583v3.patch, 
> MAPREDUCE-5583v4.patch
>
>
> It would be nice if users could specify a limit to the number of map or 
> reduce tasks that are running simultaneously.  Occasionally users are 
> performing operations in tasks that can lead to DDoS scenarios if too many 
> tasks run simultaneously (e.g.: accessing a database, web service, etc.).  
> Having the ability to throttle the number of tasks simultaneously running 
> would provide users a way to mitigate issues with too many tasks on a large 
> cluster attempting to access a serivce at any one time.
> This is similar to the functionality requested by MAPREDUCE-224 and 
> implemented by HADOOP-3412 but was dropped in mrv2.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to