java.lang.Comparable<ReservationRequest>@Public @Unstable public abstract class ReservationRequest extends java.lang.Object implements java.lang.Comparable<ReservationRequest>
ReservationRequest represents the request made by an application to
the ResourceManager to reserve Resources.
It includes:
Resource required for each request.| Modifier and Type | Class | Description |
|---|---|---|
static class |
ReservationRequest.ReservationRequestComparator |
| Constructor | Description |
|---|---|
ReservationRequest() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(ReservationRequest other) |
|
boolean |
equals(java.lang.Object obj) |
|
abstract Resource |
getCapability() |
Get the
Resource capability of the request. |
abstract int |
getConcurrency() |
Get the number of containers that need to be scheduled concurrently.
|
abstract long |
getDuration() |
Get the duration in milliseconds for which the resource is required.
|
abstract int |
getNumContainers() |
Get the number of containers required with the given specifications.
|
int |
hashCode() |
|
static ReservationRequest |
newInstance(Resource capability,
int numContainers) |
|
static ReservationRequest |
newInstance(Resource capability,
int numContainers,
int concurrency,
long duration) |
|
abstract void |
setCapability(Resource capability) |
Set the
Resource capability of the request |
abstract void |
setConcurrency(int numContainers) |
Set the number of containers that need to be scheduled concurrently.
|
abstract void |
setDuration(long duration) |
Set the duration in milliseconds for which the resource is required.
|
abstract void |
setNumContainers(int numContainers) |
Set the number of containers required with the given specifications
|
@Public @Unstable public static ReservationRequest newInstance(Resource capability, int numContainers)
@Public @Unstable public static ReservationRequest newInstance(Resource capability, int numContainers, int concurrency, long duration)
@Public @Unstable public abstract Resource getCapability()
Resource capability of the request.Resource capability of the request@Public @Unstable public abstract void setCapability(Resource capability)
Resource capability of the requestcapability - Resource capability of the request@Public @Unstable public abstract int getNumContainers()
@Public @Unstable public abstract void setNumContainers(int numContainers)
numContainers - number of containers required with the given
specifications@Public @Unstable public abstract int getConcurrency()
@Public @Unstable public abstract void setConcurrency(int numContainers)
numContainers - the number of containers to be concurrently scheduled@Public @Unstable public abstract long getDuration()
@Public @Unstable public abstract void setDuration(long duration)
duration - the duration in milliseconds for which the resource is
requiredpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(ReservationRequest other)
compareTo in interface java.lang.Comparable<ReservationRequest>Copyright © 2008–2025 Apache Software Foundation. All rights reserved.