From 5e10a13bb4759984494c6a870c7f08fb6693c9c0 Mon Sep 17 00:00:00 2001
From: subru
* The interface used by clients to submit a new reservation to the
- * {@link ResourceManager}.
+ * {@code ResourceManager}.
*
@@ -566,12 +566,12 @@ public GetContainersResponse getContainers(GetContainersRequest request)
*
*
* In order to respond, a new admission control component in the
- * {@link ResourceManager} performs an analysis of the resources that have
+ * {@code 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
+ * (e.g., {@code CapacityOverTimePolicy}). Once it has positively determined
* that the ReservationSubmissionRequest is satisfiable the
- * {@link ResourceManager} answers with a
+ * {@code 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.
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationDeleteResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationDeleteResponse.java
index eedd3a4a197..085f0d84d6b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationDeleteResponse.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationDeleteResponse.java
@@ -26,7 +26,7 @@
/**
* {@link ReservationDeleteResponse} contains the answer of the admission
- * control system in the {@link ResourceManager} to a reservation delete
+ * control system in the {@code ResourceManager} to a reservation delete
* operation. Currently response is empty if the operation was successful, if
* not an exception reporting reason for a failure.
*
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionRequest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionRequest.java
index e550fe20d79..6d5ca16744e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionRequest.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionRequest.java
@@ -69,11 +69,11 @@ public abstract void setReservationDefinition(
ReservationDefinition reservationDefinition);
/**
- * Get the name of the {@link Plan} that corresponds to the name of the
+ * Get the name of the {@code Plan} that corresponds to the name of the
* {@link QueueInfo} in the scheduler to which the reservation will be
* submitted to.
*
- * @return the name of the {@link Plan} that corresponds to the name of the
+ * @return the name of the {@code Plan} that corresponds to the name of the
* {@link QueueInfo} in the scheduler to which the reservation will be
* submitted to
*/
@@ -82,13 +82,13 @@ public abstract void setReservationDefinition(
public abstract String getQueue();
/**
- * Set the name of the {@link Plan} that corresponds to the name of the
+ * Set the name of the {@code Plan} that corresponds to the name of the
* {@link QueueInfo} in the scheduler to which the reservation will be
* submitted to
*
- * @param the name of the parent {@link Plan} that corresponds to the name of
- * the {@link QueueInfo} in the scheduler to which the reservation
- * will be submitted to
+ * @param queueName the name of the parent {@code Plan} that corresponds to
+ * the name of the {@link QueueInfo} in the scheduler to which the
+ * reservation will be submitted to
*/
@Public
@Unstable
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionResponse.java
index b57ef52a850..32fe5e0b2cb 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionResponse.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationSubmissionResponse.java
@@ -25,11 +25,9 @@
import org.apache.hadoop.yarn.api.records.ReservationId;
import org.apache.hadoop.yarn.util.Records;
-import com.sun.naming.internal.ResourceManager;
-
/**
* {@link ReservationSubmissionResponse} contains the answer of the admission
- * control system in the {@link ResourceManager} to a reservation create
+ * control system in the {@code ResourceManager} to a reservation create
* operation. Response contains a {@link ReservationId} if the operation was
* successful, if not an exception reporting reason for a failure.
*
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationUpdateResponse.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationUpdateResponse.java
index bfd2d514436..1b5c1950c55 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationUpdateResponse.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ReservationUpdateResponse.java
@@ -26,7 +26,7 @@
/**
* {@link ReservationUpdateResponse} contains the answer of the admission
- * control system in the {@link ResourceManager} to a reservation update
+ * control system in the {@code ResourceManager} to a reservation update
* operation. Currently response is empty if the operation was successful, if
* not an exception reporting reason for a failure.
*
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
index cbf1e3783ff..74da4b51205 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
@@ -433,10 +433,10 @@ public abstract void setLogAggregationContext(
* Set the reservation id, that correspond to a valid resource allocation in
* the scheduler (between start and end time of the corresponding reservation)
*
- * @param reservationId representing the unique id of the
+ * @param reservationID representing the unique id of the
* corresponding reserved resource allocation in the scheduler
*/
@Public
@Unstable
public abstract void setReservationID(ReservationId reservationID);
-}
\ No newline at end of file
+}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationDefinition.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationDefinition.java
index c94463defb4..10f592a2479 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationDefinition.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationDefinition.java
@@ -103,7 +103,7 @@ public static ReservationDefinition newInstance(long arrival, long deadline,
* Set the list of {@link ReservationRequests} representing the resources
* required by the application
*
- * @param resources the list of {@link ReservationRequests}
+ * @param reservationRequests the list of {@link ReservationRequests}
*/
@Public
@Unstable
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationId.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationId.java
index 47a8c40b1e3..71474b14b88 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationId.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationId.java
@@ -18,6 +18,7 @@
package org.apache.hadoop.yarn.api.records;
+import java.io.IOException;
import java.text.NumberFormat;
import org.apache.hadoop.classification.InterfaceAudience.Private;
@@ -33,7 +34,7 @@
*
*
* The globally unique nature of the identifier is achieved by using the
- * cluster timestamp i.e. start-time of the {@link ResourceManager}
+ * cluster timestamp i.e. start-time of the {@code ResourceManager}
* along with a monotonically increasing counter for the reservation.
*
* {@link ReservationRequest} represents the request made by an application to
- * the {@link ResourceManager} to reserve {@link Resource}s.
+ * the {@code ResourceManager} to reserve {@link Resource}s.
*
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequestInterpreter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequestInterpreter.java
index 4621e0d95af..1ee96c2d498 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequestInterpreter.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequestInterpreter.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.hadoop.yarn.api.records;
import org.apache.hadoop.classification.InterfaceAudience.Public;
@@ -72,7 +90,7 @@ public enum ReservationRequestInterpreter {
* {@link ReservationDefinition} are satisfied for the overall
* {@link ReservationDefinition} to be satisfied. Moreover, it imposes a
* strict temporal ordering on the allocation used to satisfy the
- * {@link ResourceRequeust}s. It imposes a strict temporal ordering on the
+ * {@link ReservationRequest}s. It imposes a strict temporal ordering on the
* allocation used to satisfy the {@link ReservationRequest}s. The allocations
* satisfying the {@link ReservationRequest} in position k must strictly
* precede the allocations for the {@link ReservationRequest} at position k+1.
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequests.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequests.java
index 8cc3fbccec9..80ce8ef74a6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequests.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationRequests.java
@@ -61,7 +61,7 @@ public static ReservationRequests newInstance(
* Set the list of {@link ReservationRequest} representing the resources
* required by the application
*
- * @param resources the list of {@link ReservationRequest}
+ * @param reservationResources the list of {@link ReservationRequest}
*/
@Public
@Unstable
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/YarnClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/YarnClient.java
index d697de91b0a..7cc6dde96ab 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/YarnClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/YarnClient.java
@@ -50,6 +50,7 @@
import org.apache.hadoop.yarn.api.records.NodeState;
import org.apache.hadoop.yarn.api.records.QueueInfo;
import org.apache.hadoop.yarn.api.records.QueueUserACLInfo;
+import org.apache.hadoop.yarn.api.records.ReservationDefinition;
import org.apache.hadoop.yarn.api.records.ReservationId;
import org.apache.hadoop.yarn.api.records.Token;
import org.apache.hadoop.yarn.api.records.YarnApplicationState;
@@ -486,36 +487,36 @@ public abstract void moveApplicationAcrossQueues(ApplicationId appId,
/**
*
* The interface used by clients to submit a new reservation to the
- * {@link ResourceManager}.
+ * {@code ResourceManager}.
*
* The client packages all details of its request in a
- * {@link ReservationRequest} object. This contains information about the
- * amount of capacity, temporal constraints, and gang needs. Furthermore, the
- * reservation might be composed of multiple stages, with ordering
- * dependencies among them.
+ * {@link ReservationSubmissionRequest} object. This contains information
+ * about the amount of capacity, temporal constraints, and gang needs.
+ * Furthermore, the reservation might be composed of multiple stages, with
+ * ordering dependencies among them.
*
* In order to respond, a new admission control component in the
- * {@link ResourceManager} performs an analysis of the resources that have
+ * {@code 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 ReservationRequest is satisfiable the {@link ResourceManager}
- * answers with a {@link ReservationResponse} that include a
+ * (e.g., {@code CapacityOverTimePolicy}). Once it has positively determined
+ * that the ReservationRequest is satisfiable the {@code ResourceManager}
+ * answers with a {@link ReservationSubmissionResponse} that includes a
* {@link ReservationId}. Upon failure to find a valid allocation the response
* is an exception with the message detailing the reason of failure.
*
- * The semantics guarantees that the ReservationId returned, corresponds to a
- * valid reservation existing in the time-range request by the user. The
- * amount of capacity dedicated to such reservation 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 ReservationRequest}
+ * The semantics guarantees that the {@link ReservationId} returned,
+ * corresponds to a valid reservation existing in the time-range request by
+ * the user. The amount of capacity dedicated to such reservation 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 ReservationDefinition}
*
* The allocation is attempted by virtually substituting all previous
* allocations related to this Reservation with new ones, that satisfy the new
- * {@link ReservationRequest}. Upon success the previous allocation is
+ * {@link ReservationDefinition}. Upon success the previous allocation is
* atomically 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.
*