public class GuaranteedTasksAllocator extends Object
Constructor and Description |
---|
GuaranteedTasksAllocator(org.apache.hadoop.conf.Configuration conf,
LlapPluginEndpointClient amCommunicator) |
Modifier and Type | Method and Description |
---|---|
protected int |
getExecutorCount(boolean allowUpdate) |
void |
setClusterChangedCallback(Runnable clusterChangedCallback)
Sets a callback to be invoked on cluster changes relevant to resource allocation.
|
void |
start() |
void |
stop() |
int |
translateAllocationToCpus(double allocation) |
void |
updateSessionAsync(WmTezSession session)
Updates the session asynchronously with the existing allocation.
|
int |
updateSessionsAsync(Double totalMaxAlloc,
List<WmTezSession> sessionsToUpdate)
Updates the session allocations asynchronously.
|
public GuaranteedTasksAllocator(org.apache.hadoop.conf.Configuration conf, LlapPluginEndpointClient amCommunicator)
public void start()
public void stop()
protected int getExecutorCount(boolean allowUpdate)
public int translateAllocationToCpus(double allocation)
public int updateSessionsAsync(Double totalMaxAlloc, List<WmTezSession> sessionsToUpdate)
totalMaxAlloc
- The total maximum fraction of the cluster to allocate. Used to
avoid various artifacts, esp. with small numbers and double weirdness.
Null means the total is unknown.sessionsToUpdate
- Sessions to update based on their allocation fraction.public void updateSessionAsync(WmTezSession session)
public void setClusterChangedCallback(Runnable clusterChangedCallback)
Copyright © 2022 The Apache Software Foundation. All rights reserved.