Class ResourceOption
java.lang.Object
org.apache.hadoop.yarn.api.records.ResourceOption
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNegative value means no timeout. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbuild()abstract intgetOverCommitTimeout()Get timeout for tolerant of resource over-commitment Note: negative value means no timeout so that allocated containers will keep running until the end even under resource over-commitment cases.abstract ResourcegetResource()Get the resource of the ResourceOption.static ResourceOptionnewInstance(Resource resource, int overCommitTimeout) protected abstract voidsetOverCommitTimeout(int overCommitTimeout) Set the overcommit timeout.protected abstract voidsetResource(Resource resource) toString()
-
Field Details
-
OVER_COMMIT_TIMEOUT_MILLIS_DEFAULT
public static final int OVER_COMMIT_TIMEOUT_MILLIS_DEFAULTNegative value means no timeout.- See Also:
-
-
Constructor Details
-
ResourceOption
public ResourceOption()
-
-
Method Details
-
newInstance
-
getResource
Get the resource of the ResourceOption.- Returns:
- resource of the ResourceOption
-
setResource
-
getOverCommitTimeout
@Private @Evolving public abstract int getOverCommitTimeout()Get timeout for tolerant of resource over-commitment Note: negative value means no timeout so that allocated containers will keep running until the end even under resource over-commitment cases.- Returns:
- overCommitTimeout of the ResourceOption in milliseconds.
-
setOverCommitTimeout
@Private @Evolving protected abstract void setOverCommitTimeout(int overCommitTimeout) Set the overcommit timeout.- Parameters:
overCommitTimeout- Timeout in ms. Negative means no timeout.
-
build
@Private @Evolving protected abstract void build() -
toString
-