Class UpdateContainerRequest
java.lang.Object
org.apache.hadoop.yarn.api.records.UpdateContainerRequest
UpdateContainerRequest represents the request made by an
application to the ResourceManager to update an attribute of a
Container such as its Resource allocation or (@code ExecutionType}
It includes:
- version for the container.
ContainerIdfor the container.-
Resourcecapability of the container after the update request is completed. -
ExecutionTypeof the container after the update request is completed.
- Currently only ONE aspect of the container can be updated per request (user can either update Capability OR ExecutionType in one request.. not both).
- There must be only 1 update request per container in an allocate call.
- If a new update request is sent for a container (in a subsequent allocate call) before the first one is satisfied by the Scheduler, it will overwrite the previous request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract ResourceGet theResourcecapability of the request.abstract ContainerIdGet theContainerIdof the container.abstract ContainerUpdateTypeGet theContainerUpdateTypeof the container.abstract intGet theContainerIdof the container.abstract ExecutionTypeGet the targetExecutionTypeof the container.inthashCode()static UpdateContainerRequestnewInstance(int version, ContainerId containerId, ContainerUpdateType updateType, Resource targetCapability, ExecutionType targetExecutionType) abstract voidsetCapability(Resource capability) Set theResourcecapability of the request.abstract voidsetContainerId(ContainerId containerId) Set theContainerIdof the container.abstract voidsetContainerUpdateType(ContainerUpdateType updateType) Set theContainerUpdateTypeof the container.abstract voidsetContainerVersion(int containerVersion) Set the current version of the container.abstract voidsetExecutionType(ExecutionType executionType) Set the targetExecutionTypeof the container.toString()
-
Constructor Details
-
UpdateContainerRequest
public UpdateContainerRequest()
-
-
Method Details
-
newInstance
@Public @Unstable public static UpdateContainerRequest newInstance(int version, ContainerId containerId, ContainerUpdateType updateType, Resource targetCapability, ExecutionType targetExecutionType) -
getContainerVersion
@Public @Unstable public abstract int getContainerVersion()Get theContainerIdof the container.- Returns:
ContainerIdof the container
-
setContainerVersion
@Public @Unstable public abstract void setContainerVersion(int containerVersion) Set the current version of the container.- Parameters:
containerVersion- of the container
-
getContainerUpdateType
Get theContainerUpdateTypeof the container.- Returns:
ContainerUpdateTypeof the container.
-
setContainerUpdateType
Set theContainerUpdateTypeof the container.- Parameters:
updateType- of the Container
-
getContainerId
Get theContainerIdof the container.- Returns:
ContainerIdof the container
-
setContainerId
Set theContainerIdof the container.- Parameters:
containerId-ContainerIdof the container
-
getExecutionType
Get the targetExecutionTypeof the container.- Returns:
ExecutionTypeof the container
-
setExecutionType
Set the targetExecutionTypeof the container.- Parameters:
executionType-ExecutionTypeof the container
-
setCapability
Set theResourcecapability of the request.- Parameters:
capability-Resourcecapability of the request
-
getCapability
Get theResourcecapability of the request.- Returns:
Resourcecapability of the request
-
hashCode
public int hashCode() -
toString
-
equals
-