Class ReservationListRequest
java.lang.Object
org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest
ReservationListRequest captures the set of requirements the
user has to list reservations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract longGet the end time to use to search for reservations.abstract booleanGet the boolean representing whether or not the user is requesting the full resource allocation.abstract StringgetQueue()Get queue name to use to find reservations.abstract StringGet the reservation id to use to find a reservation.abstract longGet the start time to use to search for reservations.static ReservationListRequestnewInstance(String queue, String reservationId) TheReservationListRequestwill use the reservationId to search for reservations to list if it is provided.static ReservationListRequestnewInstance(String queue, String reservationId, boolean includeReservationAllocations) TheReservationListRequestwill use the reservationId to search for reservations to list if it is provided.static ReservationListRequestnewInstance(String queue, String reservationId, long startTime, long endTime, boolean includeReservationAllocations) TheReservationListRequestwill use the reservationId to search for reservations to list if it is provided.abstract voidsetEndTime(long endTime) Set the end time to use to search for reservations.abstract voidsetIncludeResourceAllocations(boolean includeReservationAllocations) Set the boolean representing whether or not the user is requesting the full resource allocation.abstract voidSet queue name to use to find resource allocations.abstract voidsetReservationId(String reservationId) Set the reservation id to use to find a reservation.abstract voidsetStartTime(long startTime) Set the start time to use to search for reservations.
-
Constructor Details
-
ReservationListRequest
public ReservationListRequest()
-
-
Method Details
-
newInstance
@Public @Unstable public static ReservationListRequest newInstance(String queue, String reservationId, long startTime, long endTime, boolean includeReservationAllocations) TheReservationListRequestwill use the reservationId to search for reservations to list if it is provided. Otherwise, it will select active reservations within the startTime and endTime (inclusive).- Parameters:
queue- Required. Cannot be null or empty. Refers to the reservable queue in the scheduler that was selected when creating a reservation submissionReservationSubmissionRequest.reservationId- Optional. String representation ofReservationIdIf provided, other fields will be ignored.startTime- Optional. If provided, only reservations that end after the startTime will be selected. This defaults to 0 if an invalid number is used.endTime- Optional. If provided, only reservations that start on or before endTime will be selected. This defaults to Long.MAX_VALUE if an invalid number is used.includeReservationAllocations- Optional. Flag that determines whether the entire reservation allocations are to be returned. Reservation allocations are subject to change in the event of re-planning as described byReservationDefinition.- Returns:
- the list of reservations via
ReservationListRequest
-
newInstance
@Public @Unstable public static ReservationListRequest newInstance(String queue, String reservationId, boolean includeReservationAllocations) TheReservationListRequestwill use the reservationId to search for reservations to list if it is provided. Otherwise, it will select active reservations within the startTime and endTime (inclusive).- Parameters:
queue- Required. Cannot be null or empty. Refers to the reservable queue in the scheduler that was selected when creating a reservation submissionReservationSubmissionRequest.reservationId- Optional. String representation ofReservationIdIf provided, other fields will be ignored.includeReservationAllocations- Optional. Flag that determines whether the entire reservation allocations are to be returned. Reservation allocations are subject to change in the event of re-planning as described byReservationDefinition.- Returns:
- the list of reservations via
ReservationListRequest
-
newInstance
@Public @Unstable public static ReservationListRequest newInstance(String queue, String reservationId) TheReservationListRequestwill use the reservationId to search for reservations to list if it is provided. Otherwise, it will select active reservations within the startTime and endTime (inclusive).- Parameters:
queue- Required. Cannot be null or empty. Refers to the reservable queue in the scheduler that was selected when creating a reservation submissionReservationSubmissionRequest.reservationId- Optional. String representation ofReservationIdIf provided, other fields will be ignored.- Returns:
- the list of reservations via
ReservationListRequest
-
getQueue
Get queue name to use to find reservations.- Returns:
- the queue name to use to find reservations.
-
setQueue
Set queue name to use to find resource allocations.- Parameters:
queue- Required. Cannot be null or empty.
-
getReservationId
Get the reservation id to use to find a reservation.- Returns:
- the reservation id of the reservation.
-
setReservationId
Set the reservation id to use to find a reservation.- Parameters:
reservationId- Optional. String representation ofReservationIdIf provided, other fields will be ignored.
-
getStartTime
@Public @Unstable public abstract long getStartTime()Get the start time to use to search for reservations. When this is set, reservations that start before this start time are ignored.- Returns:
- the start time to use to search for reservations.
-
setStartTime
@Public @Unstable public abstract void setStartTime(long startTime) Set the start time to use to search for reservations. When this is set, reservations that start before this start time are ignored.- Parameters:
startTime- Optional. If provided, only reservations that end after the startTime will be selected. This defaults to 0 if an invalid number is used.
-
getEndTime
@Public @Unstable public abstract long getEndTime()Get the end time to use to search for reservations. When this is set, reservations that start after this end time are ignored.- Returns:
- the end time to use to search for reservations.
-
setEndTime
@Public @Unstable public abstract void setEndTime(long endTime) Set the end time to use to search for reservations. When this is set, reservations that start after this end time are ignored.- Parameters:
endTime- Optional. If provided, only reservations that start before endTime will be selected. This defaults to Long.MAX_VALUE if an invalid number is used.
-
getIncludeResourceAllocations
@Public @Unstable public abstract boolean getIncludeResourceAllocations()Get the boolean representing whether or not the user is requesting the full resource allocation. If this is true, the full resource allocation will be included in the response.- Returns:
- the end time to use to search for reservations.
-
setIncludeResourceAllocations
@Public @Unstable public abstract void setIncludeResourceAllocations(boolean includeReservationAllocations) Set the boolean representing whether or not the user is requesting the full resource allocation. If this is true, the full resource allocation will be included in the response.- Parameters:
includeReservationAllocations- Optional. Flag that determines whether the entire list ofResourceAllocationRequestwill be returned.
-