All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.twill.internal.yarn.YarnApplicationReport Maven / Gradle / Ivy

/*
 * 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.twill.internal.yarn;

import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
import org.apache.hadoop.yarn.api.records.YarnApplicationState;

/**
 * This interface is for adapting differences in ApplicationReport in different Hadoop version.
 */
public interface YarnApplicationReport {

  /**
   * Get the ApplicationId of the application.
   * @return ApplicationId of the application
   */
  ApplicationId getApplicationId();

  /**
   * Get the ApplicationAttemptId of the current
   * attempt of the application.
   * @return ApplicationAttemptId of the attempt
   */
  ApplicationAttemptId getCurrentApplicationAttemptId();

  /**
   * Get the queue to which the application was submitted.
   * @return queue to which the application was submitted
   */
  String getQueue();

  /**
   * Get the user-defined name of the application.
   * @return name of the application
   */
  String getName();

  /**
   * Get the host on which the ApplicationMaster
   * is running.
   * @return host on which the ApplicationMaster
   *         is running
   */
  String getHost();

  /**
   * Get the RPC port of the ApplicationMaster.
   * @return RPC port of the ApplicationMaster
   */
  int getRpcPort();


  /**
   * Get the YarnApplicationState of the application.
   * @return YarnApplicationState of the application
   */
  YarnApplicationState getYarnApplicationState();


  /**
   * Get  the diagnositic information of the application in case of
   * errors.
   * @return diagnositic information of the application in case
   *         of errors
   */
  String getDiagnostics();


  /**
   * Get the tracking url for the application.
   * @return tracking url for the application
   */
  String getTrackingUrl();


  /**
   * Get the original not-proxied tracking url for the application.
   * This is intended to only be used by the proxy itself.
   * @return the original not-proxied tracking url for the application
   */
  String getOriginalTrackingUrl();

  /**
   * Get the start time of the application.
   * @return start time of the application
   */
  long getStartTime();


  /**
   * Get the finish time of the application.
   * @return finish time of the application
   */
  long getFinishTime();


  /**
   * Get the final finish status of the application.
   * @return final finish status of the application
   */
  FinalApplicationStatus getFinalApplicationStatus();

  /**
   * Retrieve the structure containing the job resources for this application.
   * @return the job resources structure for this application
   */
  ApplicationResourceUsageReport getApplicationResourceUsageReport();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy