Class ReservationInputValidator
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.reservation.ReservationInputValidator
-
Constructor Summary
ConstructorsConstructorDescriptionReservationInputValidator(org.apache.hadoop.yarn.util.Clock clock) Utility class to validate reservation requests. -
Method Summary
Modifier and TypeMethodDescriptionvalidateReservationDeleteRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest request) validateReservationListRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest request) validateReservationSubmissionRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request, org.apache.hadoop.yarn.api.records.ReservationId reservationId) validateReservationUpdateRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest request)
-
Constructor Details
-
ReservationInputValidator
public ReservationInputValidator(org.apache.hadoop.yarn.util.Clock clock) Utility class to validate reservation requests.- Parameters:
clock- theClockto use
-
-
Method Details
-
validateReservationSubmissionRequest
public Plan validateReservationSubmissionRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request, org.apache.hadoop.yarn.api.records.ReservationId reservationId) throws org.apache.hadoop.yarn.exceptions.YarnException Quick validation on the input to check some obvious fail conditions (fail fast) the input and returns the appropriatePlanassociated with the specifiedQueueor throws an exception message illustrating the details of any validation check failures- Parameters:
reservationSystem- theReservationSystemto validate againstrequest- theReservationSubmissionRequestdefining the resources required over time for the requestreservationId- theReservationIdassociated with the current request- Returns:
- the
Planto submit the request to - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if validation fails
-
validateReservationUpdateRequest
public Plan validateReservationUpdateRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException Quick validation on the input to check some obvious fail conditions (fail fast) the input and returns the appropriatePlanassociated with the specifiedQueueor throws an exception message illustrating the details of any validation check failures- Parameters:
reservationSystem- theReservationSystemto validate againstrequest- theReservationUpdateRequestdefining the resources required over time for the request- Returns:
- the
Planto submit the request to - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if validation fails
-
validateReservationListRequest
public Plan validateReservationListRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException Quick validation on the input to check some obvious fail conditions (fail fast) the input and returns the appropriatePlanassociated with the specifiedQueueor throws an exception message illustrating the details of any validation check failures.- Parameters:
reservationSystem- theReservationSystemto validate againstrequest- theReservationListRequestdefining search parameters for reservations in theReservationSystemthat is being validated against.- Returns:
- the
Planto list reservations of. - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if validation fails
-
validateReservationDeleteRequest
public Plan validateReservationDeleteRequest(ReservationSystem reservationSystem, org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException Quick validation on the input to check some obvious fail conditions (fail fast) the input and returns the appropriatePlanassociated with the specifiedQueueor throws an exception message illustrating the details of any validation check failures- Parameters:
reservationSystem- theReservationSystemto validate againstrequest- theReservationDeleteRequestdefining the resources required over time for the request- Returns:
- the
Planto submit the request to - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if validation fails
-