Class ResourceOption

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

@Public @Evolving public abstract class ResourceOption extends Object
  • Field Details

    • OVER_COMMIT_TIMEOUT_MILLIS_DEFAULT

      public static final int OVER_COMMIT_TIMEOUT_MILLIS_DEFAULT
      Negative value means no timeout.
      See Also:
  • Constructor Details

    • ResourceOption

      public ResourceOption()
  • Method Details

    • newInstance

      public static ResourceOption newInstance(Resource resource, int overCommitTimeout)
    • getResource

      @Private @Evolving public abstract Resource getResource()
      Get the resource of the ResourceOption.
      Returns:
      resource of the ResourceOption
    • setResource

      @Private @Evolving protected abstract void setResource(Resource resource)
    • 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

      public String toString()
      Overrides:
      toString in class Object