|
@@ -57,6 +57,12 @@ import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesReq
|
|
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenResponse;
|
|
|
|
+import org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest;
|
|
|
|
+import org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse;
|
|
|
|
+import org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest;
|
|
|
|
+import org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse;
|
|
|
|
+import org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest;
|
|
|
|
+import org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
|
@@ -67,6 +73,7 @@ import org.apache.hadoop.yarn.api.records.ContainerId;
|
|
import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
|
|
import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
|
|
import org.apache.hadoop.yarn.api.records.ContainerReport;
|
|
import org.apache.hadoop.yarn.api.records.ContainerReport;
|
|
import org.apache.hadoop.yarn.api.records.NodeReport;
|
|
import org.apache.hadoop.yarn.api.records.NodeReport;
|
|
|
|
+import org.apache.hadoop.yarn.api.records.ReservationId;
|
|
import org.apache.hadoop.yarn.api.records.Resource;
|
|
import org.apache.hadoop.yarn.api.records.Resource;
|
|
import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
|
import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
|
import org.apache.hadoop.yarn.api.records.Token;
|
|
import org.apache.hadoop.yarn.api.records.Token;
|
|
@@ -543,4 +550,110 @@ public interface ApplicationClientProtocol {
|
|
public GetContainersResponse getContainers(GetContainersRequest request)
|
|
public GetContainersResponse getContainers(GetContainersRequest request)
|
|
throws YarnException, IOException;
|
|
throws YarnException, IOException;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * <p>
|
|
|
|
+ * The interface used by clients to submit a new reservation to the
|
|
|
|
+ * {@link ResourceManager}.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * <p>
|
|
|
|
+ * The client packages all details of its request in a
|
|
|
|
+ * {@link ReservationSubmissionRequest} object. This contains information
|
|
|
|
+ * about the amount of capacity, temporal constraints, and concurrency needs.
|
|
|
|
+ * Furthermore, the reservation might be composed of multiple stages, with
|
|
|
|
+ * ordering dependencies among them.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * <p>
|
|
|
|
+ * In order to respond, a new admission control component in the
|
|
|
|
+ * {@link ResourceManager} performs an analysis of the resources that have
|
|
|
|
+ * been committed over the period of time the user is requesting, verify that
|
|
|
|
+ * the user requests can be fulfilled, and that it respect a sharing policy
|
|
|
|
+ * (e.g., {@link CapacityOverTimePolicy}). Once it has positively determined
|
|
|
|
+ * that the ReservationSubmissionRequest is satisfiable the
|
|
|
|
+ * {@link ResourceManager} answers with a
|
|
|
|
+ * {@link ReservationSubmissionResponse} that include a non-null
|
|
|
|
+ * {@link ReservationId}. Upon failure to find a valid allocation the response
|
|
|
|
+ * is an exception with the reason.
|
|
|
|
+ *
|
|
|
|
+ * On application submission the client can use this {@link ReservationId} to
|
|
|
|
+ * obtain access to the reserved resources.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * <p>
|
|
|
|
+ * The system guarantees that during the time-range specified by the user, the
|
|
|
|
+ * reservationID will be corresponding to a valid reservation. The amount of
|
|
|
|
+ * capacity dedicated to such queue can vary overtime, depending of the
|
|
|
|
+ * allocation that has been determined. But it is guaranteed to satisfy all
|
|
|
|
+ * the constraint expressed by the user in the
|
|
|
|
+ * {@link ReservationSubmissionRequest}.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @param request the request to submit a new Reservation
|
|
|
|
+ * @return response the {@link ReservationId} on accepting the submission
|
|
|
|
+ * @throws YarnException if the request is invalid or reservation cannot be
|
|
|
|
+ * created successfully
|
|
|
|
+ * @throws IOException
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ @Public
|
|
|
|
+ @Unstable
|
|
|
|
+ public ReservationSubmissionResponse submitReservation(
|
|
|
|
+ ReservationSubmissionRequest request) throws YarnException, IOException;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * <p>
|
|
|
|
+ * The interface used by clients to update an existing Reservation. This is
|
|
|
|
+ * referred to as a re-negotiation process, in which a user that has
|
|
|
|
+ * previously submitted a Reservation.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * <p>
|
|
|
|
+ * The allocation is attempted by virtually substituting all previous
|
|
|
|
+ * allocations related to this Reservation with new ones, that satisfy the new
|
|
|
|
+ * {@link ReservationUpdateRequest}. Upon success the previous allocation is
|
|
|
|
+ * substituted by the new one, and on failure (i.e., if the system cannot find
|
|
|
|
+ * a valid allocation for the updated request), the previous allocation
|
|
|
|
+ * remains valid.
|
|
|
|
+ *
|
|
|
|
+ * The {@link ReservationId} is not changed, and applications currently
|
|
|
|
+ * running within this reservation will automatically receive the resources
|
|
|
|
+ * based on the new allocation.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @param request to update an existing Reservation (the ReservationRequest
|
|
|
|
+ * should refer to an existing valid {@link ReservationId})
|
|
|
|
+ * @return response empty on successfully updating the existing reservation
|
|
|
|
+ * @throws YarnException if the request is invalid or reservation cannot be
|
|
|
|
+ * updated successfully
|
|
|
|
+ * @throws IOException
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ @Public
|
|
|
|
+ @Unstable
|
|
|
|
+ public ReservationUpdateResponse updateReservation(
|
|
|
|
+ ReservationUpdateRequest request) throws YarnException, IOException;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * <p>
|
|
|
|
+ * The interface used by clients to remove an existing Reservation.
|
|
|
|
+ *
|
|
|
|
+ * Upon deletion of a reservation applications running with this reservation,
|
|
|
|
+ * are automatically downgraded to normal jobs running without any dedicated
|
|
|
|
+ * reservation.
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @param request to remove an existing Reservation (the ReservationRequest
|
|
|
|
+ * should refer to an existing valid {@link ReservationId})
|
|
|
|
+ * @return response empty on successfully deleting the existing reservation
|
|
|
|
+ * @throws YarnException if the request is invalid or reservation cannot be
|
|
|
|
+ * deleted successfully
|
|
|
|
+ * @throws IOException
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ @Public
|
|
|
|
+ @Unstable
|
|
|
|
+ public ReservationDeleteResponse deleteReservation(
|
|
|
|
+ ReservationDeleteRequest request) throws YarnException, IOException;
|
|
|
|
+
|
|
}
|
|
}
|