    001/*
    002 * Copyright (c) 2007-2017 Xplenty, Inc. All Rights Reserved.
    003 *
    004 * Project and contact information: http://www.cascading.org/
    005 *
    006 * This file is part of the Cascading project.
    007 *
    008 * Licensed under the Apache License, Version 2.0 (the "License");
    009 * you may not use this file except in compliance with the License.
    010 * You may obtain a copy of the License at
    011 *
    012 *     http://www.apache.org/licenses/LICENSE-2.0
    013 *
    014 * Unless required by applicable law or agreed to in writing, software
    015 * distributed under the License is distributed on an "AS IS" BASIS,
    016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    017 * See the License for the specific language governing permissions and
    018 * limitations under the License.
    019 */
    020
    021package cascading.stats.tez.util;
    022
    023import java.util.Map;
    024
    025/**
    026 *
    027 */
    028public class TaskStatus
    029  {
    030  String taskID;
    031  String status;
    032  long scheduledTime;
    033  long startTime;
    034  long endTime;
    035  String successfulAttemptID;
    036  Map<String, Map<String, Long>> counters;
    037  private String diagnostics;
    038
    039  public TaskStatus( String taskID )
    040    {
    041    this.taskID = taskID;
    042    }
    043
    044  public TaskStatus( String taskID, String status, long scheduledTime, long startTime, long endTime, String successfulAttemptID, Map<String, Map<String, Long>> counters, String diagnostics )
    045    {
    046    this.taskID = taskID;
    047    this.status = status;
    048    this.scheduledTime = scheduledTime;
    049    this.startTime = startTime;
    050    this.endTime = endTime;
    051    this.successfulAttemptID = successfulAttemptID;
    052    this.counters = counters;
    053    this.diagnostics = diagnostics;
    054    }
    055
    056  public String getTaskID()
    057    {
    058    return taskID;
    059    }
    060
    061  public String getStatus()
    062    {
    063    return status;
    064    }
    065
    066  public long getScheduledTime()
    067    {
    068    return scheduledTime;
    069    }
    070
    071  public long getStartTime()
    072    {
    073    return startTime;
    074    }
    075
    076  public long getEndTime()
    077    {
    078    return endTime;
    079    }
    080
    081  public String getSuccessfulAttemptID()
    082    {
    083    return successfulAttemptID;
    084    }
    085
    086  public Map<String, Map<String, Long>> getCounters()
    087    {
    088    return counters;
    089    }
    090
    091  public String getDiagnostics()
    092    {
    093    return diagnostics;
    094    }
    095  }