|
@@ -32,14 +32,12 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
|
import org.apache.hadoop.io.Text;
|
|
import org.apache.hadoop.io.Text;
|
|
import org.apache.hadoop.service.AbstractService;
|
|
import org.apache.hadoop.service.AbstractService;
|
|
import org.apache.hadoop.yarn.api.ApplicationClientProtocol;
|
|
import org.apache.hadoop.yarn.api.ApplicationClientProtocol;
|
|
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest;
|
|
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse;
|
|
import org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse;
|
|
-import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest;
|
|
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptReport;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptReport;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
|
@@ -58,8 +56,10 @@ import org.apache.hadoop.yarn.api.records.Token;
|
|
import org.apache.hadoop.yarn.api.records.YarnApplicationState;
|
|
import org.apache.hadoop.yarn.api.records.YarnApplicationState;
|
|
import org.apache.hadoop.yarn.api.records.YarnClusterMetrics;
|
|
import org.apache.hadoop.yarn.api.records.YarnClusterMetrics;
|
|
import org.apache.hadoop.yarn.client.api.impl.YarnClientImpl;
|
|
import org.apache.hadoop.yarn.client.api.impl.YarnClientImpl;
|
|
|
|
+import org.apache.hadoop.yarn.exceptions.ApplicationAttemptNotFoundException;
|
|
import org.apache.hadoop.yarn.exceptions.ApplicationIdNotProvidedException;
|
|
import org.apache.hadoop.yarn.exceptions.ApplicationIdNotProvidedException;
|
|
import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException;
|
|
import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException;
|
|
|
|
+import org.apache.hadoop.yarn.exceptions.ContainerNotFoundException;
|
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
|
import org.apache.hadoop.yarn.security.AMRMTokenIdentifier;
|
|
import org.apache.hadoop.yarn.security.AMRMTokenIdentifier;
|
|
|
|
|
|
@@ -171,7 +171,6 @@ public abstract class YarnClient extends AbstractService {
|
|
* <li>original tracking URL - set to "N/A"</li>
|
|
* <li>original tracking URL - set to "N/A"</li>
|
|
* <li>resource usage report - all values are -1</li>
|
|
* <li>resource usage report - all values are -1</li>
|
|
* </ul>
|
|
* </ul>
|
|
- * </p>
|
|
|
|
*
|
|
*
|
|
* @param appId
|
|
* @param appId
|
|
* {@link ApplicationId} of the application that needs a report
|
|
* {@link ApplicationId} of the application that needs a report
|
|
@@ -184,20 +183,20 @@ public abstract class YarnClient extends AbstractService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* Get the AMRM token of the application.
|
|
* Get the AMRM token of the application.
|
|
- * <p/>
|
|
|
|
|
|
+ * <p>
|
|
* The AMRM token is required for AM to RM scheduling operations. For
|
|
* The AMRM token is required for AM to RM scheduling operations. For
|
|
* managed Application Masters Yarn takes care of injecting it. For unmanaged
|
|
* managed Application Masters Yarn takes care of injecting it. For unmanaged
|
|
* Applications Masters, the token must be obtained via this method and set
|
|
* Applications Masters, the token must be obtained via this method and set
|
|
* in the {@link org.apache.hadoop.security.UserGroupInformation} of the
|
|
* in the {@link org.apache.hadoop.security.UserGroupInformation} of the
|
|
* current user.
|
|
* current user.
|
|
- * <p/>
|
|
|
|
|
|
+ * <p>
|
|
* The AMRM token will be returned only if all the following conditions are
|
|
* The AMRM token will be returned only if all the following conditions are
|
|
* met:
|
|
* met:
|
|
- * <li>
|
|
|
|
- * <ul>the requester is the owner of the ApplicationMaster</ul>
|
|
|
|
- * <ul>the application master is an unmanaged ApplicationMaster</ul>
|
|
|
|
- * <ul>the application master is in ACCEPTED state</ul>
|
|
|
|
- * </li>
|
|
|
|
|
|
+ * <ul>
|
|
|
|
+ * <li>the requester is the owner of the ApplicationMaster</li>
|
|
|
|
+ * <li>the application master is an unmanaged ApplicationMaster</li>
|
|
|
|
+ * <li>the application master is in ACCEPTED state</li>
|
|
|
|
+ * </ul>
|
|
* Else this method returns NULL.
|
|
* Else this method returns NULL.
|
|
*
|
|
*
|
|
* @param appId {@link ApplicationId} of the application to get the AMRM token
|
|
* @param appId {@link ApplicationId} of the application to get the AMRM token
|
|
@@ -415,7 +414,7 @@ public abstract class YarnClient extends AbstractService {
|
|
* a report
|
|
* a report
|
|
* @return application attempt report
|
|
* @return application attempt report
|
|
* @throws YarnException
|
|
* @throws YarnException
|
|
- * @throws {@link ApplicationAttemptNotFoundException} if application attempt
|
|
|
|
|
|
+ * @throws ApplicationAttemptNotFoundException if application attempt
|
|
* not found
|
|
* not found
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@@ -450,7 +449,7 @@ public abstract class YarnClient extends AbstractService {
|
|
* {@link ContainerId} of the container that needs a report
|
|
* {@link ContainerId} of the container that needs a report
|
|
* @return container report
|
|
* @return container report
|
|
* @throws YarnException
|
|
* @throws YarnException
|
|
- * @throws {@link ContainerNotFoundException} if container not found.
|
|
|
|
|
|
+ * @throws ContainerNotFoundException if container not found.
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
public abstract ContainerReport getContainerReport(ContainerId containerId)
|
|
public abstract ContainerReport getContainerReport(ContainerId containerId)
|