001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.yarn.api.protocolrecords;
020
021import org.apache.hadoop.classification.InterfaceAudience.Public;
022import org.apache.hadoop.classification.InterfaceStability.Stable;
023import org.apache.hadoop.yarn.api.ApplicationClientProtocol;
024import org.apache.hadoop.yarn.api.records.ApplicationId;
025import org.apache.hadoop.yarn.api.records.ApplicationReport;
026import org.apache.hadoop.yarn.util.Records;
027
028/**
029 * <p>The request sent by a client to the <code>ResourceManager</code> to 
030 * get an {@link ApplicationReport} for an application.</p>
031 * 
032 * <p>The request should include the {@link ApplicationId} of the 
033 * application.</p>
034 * 
035 * @see ApplicationClientProtocol#getApplicationReport(GetApplicationReportRequest)
036 * @see ApplicationReport
037 */
038@Public
039@Stable
040public abstract class GetApplicationReportRequest {
041
042  @Public
043  @Stable
044  public static GetApplicationReportRequest newInstance(
045      ApplicationId applicationId) {
046    GetApplicationReportRequest request =
047        Records.newRecord(GetApplicationReportRequest.class);
048    request.setApplicationId(applicationId);
049    return request;
050  }
051
052  /**
053   * Get the <code>ApplicationId</code> of the application.
054   * @return <code>ApplicationId</code> of the application
055   */
056  @Public
057  @Stable
058  public abstract ApplicationId getApplicationId();
059  
060  /**
061   * Set the <code>ApplicationId</code> of the application
062   * @param applicationId <code>ApplicationId</code> of the application
063   */
064  @Public
065  @Stable
066  public abstract void setApplicationId(ApplicationId applicationId);
067}