org.apache.hadoop.yarn.api.records
Class ResourceOption

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ResourceOption

@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class ResourceOption
extends Object


Constructor Summary
ResourceOption()
           
 
Method Summary
protected abstract  void build()
           
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.
abstract  Resource getResource()
          Get the resource of the ResourceOption.
static ResourceOption newInstance(Resource resource, int overCommitTimeout)
           
protected abstract  void setOverCommitTimeout(int overCommitTimeout)
           
protected abstract  void setResource(Resource resource)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceOption

public ResourceOption()
Method Detail

newInstance

public static ResourceOption newInstance(Resource resource,
                                         int overCommitTimeout)

getResource

@InterfaceAudience.Private
@InterfaceStability.Evolving
public abstract Resource getResource()
Get the resource of the ResourceOption.

Returns:
resource of the ResourceOption

setResource

@InterfaceAudience.Private
@InterfaceStability.Evolving
protected abstract void setResource(Resource resource)

getOverCommitTimeout

@InterfaceAudience.Private
@InterfaceStability.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

setOverCommitTimeout

@InterfaceAudience.Private
@InterfaceStability.Evolving
protected abstract void setOverCommitTimeout(int overCommitTimeout)

build

protected abstract void build()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Apache Software Foundation. All Rights Reserved.