/**
 * 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.
 */

option java_package = "org.apache.hadoop.yarn.proto";
option java_outer_classname = "ApplicationHistoryServerProtos";
option java_generic_services = true;
option java_generate_equals_and_hash = true;
package hadoop.yarn;

import "yarn_protos.proto";

message ApplicationHistoryDataProto {
  optional ApplicationIdProto application_id = 1;
  optional string application_name = 2;
  optional string application_type = 3;
  optional string user = 4;
  optional string queue = 5;
  optional int64 submit_time = 6;
  optional int64 start_time = 7;
  optional int64 finish_time = 8;
  optional string diagnostics_info = 9;
  optional FinalApplicationStatusProto final_application_status = 10;
  optional YarnApplicationStateProto yarn_application_state = 11;
}

message ApplicationStartDataProto {
  optional ApplicationIdProto application_id = 1;
  optional string application_name = 2;
  optional string application_type = 3;
  optional string user = 4;
  optional string queue = 5;
  optional int64 submit_time = 6;
  optional int64 start_time = 7;
}

message ApplicationFinishDataProto {
  optional ApplicationIdProto application_id = 1;
  optional int64 finish_time = 2;
  optional string diagnostics_info = 3;
  optional FinalApplicationStatusProto final_application_status = 4;
  optional YarnApplicationStateProto yarn_application_state = 5;
}

message ApplicationAttemptHistoryDataProto {
  optional ApplicationAttemptIdProto application_attempt_id = 1;
  optional string host = 2;
  optional int32 rpc_port = 3;
  optional string tracking_url = 4;
  optional string diagnostics_info = 5;
  optional FinalApplicationStatusProto final_application_status = 6;
  optional ContainerIdProto master_container_id = 7;
  optional YarnApplicationAttemptStateProto yarn_application_attempt_state = 8;
}

message ApplicationAttemptStartDataProto {
  optional ApplicationAttemptIdProto application_attempt_id = 1;
  optional string host = 2;
  optional int32 rpc_port = 3;
  optional ContainerIdProto master_container_id = 4;
}

message ApplicationAttemptFinishDataProto {
  optional ApplicationAttemptIdProto application_attempt_id = 1;
  optional string tracking_url = 2;
  optional string diagnostics_info = 3;
  optional FinalApplicationStatusProto final_application_status = 4;
  optional YarnApplicationAttemptStateProto yarn_application_attempt_state = 5;
}

message ContainerHistoryDataProto {
  optional ContainerIdProto container_id = 1;
  optional ResourceProto allocated_resource = 2;
  optional NodeIdProto assigned_node_id = 3;
  optional PriorityProto priority = 4;
  optional int64 start_time = 5;
  optional int64 finish_time = 6;
  optional string diagnostics_info = 7;
  optional int32 container_exit_status = 8;
  optional ContainerStateProto container_state = 9;
}

message ContainerStartDataProto {
  optional ContainerIdProto container_id = 1;
  optional ResourceProto allocated_resource = 2;
  optional NodeIdProto assigned_node_id = 3;
  optional PriorityProto priority = 4;
  optional int64 start_time = 5;
}

message ContainerFinishDataProto {
  optional ContainerIdProto container_id = 1;
  optional int64 finish_time = 2;
  optional string diagnostics_info = 3;
  optional int32 container_exit_status = 4;
  optional ContainerStateProto container_state = 5;
}