org.apache.hadoop.yarn.server.resourcemanager.scheduler
Class SchedulerUtils
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerUtils
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class SchedulerUtils
- extends Object
Utilities shared by schedulers.
|
Method Summary |
static org.apache.hadoop.yarn.api.records.ContainerStatus |
createAbnormalContainerStatus(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String diagnostics)
Utility to create a ContainerStatus during exceptional
circumstances. |
static void |
normalizeRequest(org.apache.hadoop.yarn.api.records.ResourceRequest ask,
int minMemory)
Utility method to normalize a resource request, by insuring that the
requested memory is a multiple of minMemory and is not zero. |
static void |
normalizeRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> asks,
int minMemory)
Utility method to normalize a list of resource requests, by insuring that
the memory for each request is a multiple of minMemory and is not zero. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RELEASED_CONTAINER
public static final String RELEASED_CONTAINER
- See Also:
- Constant Field Values
LOST_CONTAINER
public static final String LOST_CONTAINER
- See Also:
- Constant Field Values
COMPLETED_APPLICATION
public static final String COMPLETED_APPLICATION
- See Also:
- Constant Field Values
EXPIRED_CONTAINER
public static final String EXPIRED_CONTAINER
- See Also:
- Constant Field Values
UNRESERVED_CONTAINER
public static final String UNRESERVED_CONTAINER
- See Also:
- Constant Field Values
SchedulerUtils
public SchedulerUtils()
createAbnormalContainerStatus
public static org.apache.hadoop.yarn.api.records.ContainerStatus createAbnormalContainerStatus(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String diagnostics)
- Utility to create a
ContainerStatus during exceptional
circumstances.
- Parameters:
containerId - ContainerId of returned/released/lost container.diagnostics - diagnostic message
- Returns:
ContainerStatus for an returned/released/lost
container
normalizeRequests
public static void normalizeRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> asks,
int minMemory)
- Utility method to normalize a list of resource requests, by insuring that
the memory for each request is a multiple of minMemory and is not zero.
- Parameters:
asks - a list of resource requests.minMemory - the configured minimum memory allocation.
normalizeRequest
public static void normalizeRequest(org.apache.hadoop.yarn.api.records.ResourceRequest ask,
int minMemory)
- Utility method to normalize a resource request, by insuring that the
requested memory is a multiple of minMemory and is not zero.
- Parameters:
ask - the resource request.minMemory - the configured minimum memory allocation.
Copyright © 2012 Apache Software Foundation. All Rights Reserved.