org.apache.hadoop.yarn.server.scheduler

## Class ResourceRequestSetKey

- java.lang.Object
- - org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey
  - - org.apache.hadoop.yarn.server.scheduler.ResourceRequestSetKey

- All Implemented Interfaces:
    Comparable<SchedulerRequestKey>

      public class ResourceRequestSetKey
      extends SchedulerRequestKey

  The scheduler key for a group of `ResourceRequest`. TODO: after YARN-7631 is fixed by adding Resource and ExecType into SchedulerRequestKey, then we can directly use that.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceRequestSetKey(long allocationRequestId, org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource resource, org.apache.hadoop.yarn.api.records.ExecutionType execType)` Create the key object from member objects.
    `ResourceRequestSetKey(org.apache.hadoop.yarn.api.records.ResourceRequest rr)` Create the key object from a `ResourceRequest`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(SchedulerRequestKey other)`
    `boolean` | `equals(Object obj)`
    `org.apache.hadoop.yarn.api.records.ExecutionType` | `getExeType()`
    `org.apache.hadoop.yarn.api.records.Resource` | `getResource()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey

      `create, create, create, extractFrom, getAllocationRequestId, getContainerToUpdate, getPriority`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourceRequestSetKey

          public ResourceRequestSetKey(org.apache.hadoop.yarn.api.records.ResourceRequest rr)
                                throws org.apache.hadoop.yarn.exceptions.YarnException

      Create the key object from a `ResourceRequest`.
      Parameters:
        `rr` - Resource request object
      Throws:
        `org.apache.hadoop.yarn.exceptions.YarnException` - if fails

    - #### ResourceRequestSetKey

          public ResourceRequestSetKey(long allocationRequestId,
                                       org.apache.hadoop.yarn.api.records.Priority priority,
                                       org.apache.hadoop.yarn.api.records.Resource resource,
                                       org.apache.hadoop.yarn.api.records.ExecutionType execType)

      Create the key object from member objects.
      Parameters:
        `allocationRequestId` - allocate request id of the ask
        `priority` - the priority of the ask
        `resource` - the resource size of the ask
        `execType` - the execution type of the ask

  - ### Method Detail

    - #### getResource

          public org.apache.hadoop.yarn.api.records.Resource getResource()

    - #### getExeType

          public org.apache.hadoop.yarn.api.records.ExecutionType getExeType()

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `SchedulerRequestKey`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `SchedulerRequestKey`

    - #### compareTo

          public int compareTo(SchedulerRequestKey other)

      Specified by:
        `compareTo` in interface `Comparable<SchedulerRequestKey>`
      Overrides:
        `compareTo` in class `SchedulerRequestKey`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `SchedulerRequestKey`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.