public class TaskIdsPermitsBarrier extends Object
Constructor and Description |
---|
TaskIdsPermitsBarrier(org.apache.hadoop.util.Progressable progressable)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
releaseOnePermit()
Release one permit.
|
void |
releasePermits(long permits)
Release some permits.
|
void |
requirePermits(long permits,
int taskId)
Require more permits.
|
void |
waitForRequiredPermits(Set<Integer> expectedTaskIds)
Wait until permits have been required desired number of times,
and all required permits are available
|
public TaskIdsPermitsBarrier(org.apache.hadoop.util.Progressable progressable)
progressable
- Progressable for reporting progresspublic void waitForRequiredPermits(Set<Integer> expectedTaskIds)
expectedTaskIds
- List of task ids which we are waiting permits frompublic void requirePermits(long permits, int taskId)
permits
- Number of permits to requiretaskId
- Task id which required permitspublic void releaseOnePermit()
public void releasePermits(long permits)
permits
- Number of permits to releaseCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.