Package org.apache.hadoop.mapreduce

Examples of org.apache.hadoop.mapreduce.TaskID


  @Override
  public Task getTask(TaskId taskId) {
    if (tasksLoaded.get()) {
      return tasks.get(taskId);
    } else {
      TaskID oldTaskId = TypeConverter.fromYarn(taskId);
      CompletedTask completedTask =
          new CompletedTask(taskId, jobInfo.getAllTasks().get(oldTaskId));
      return completedTask;
    }
  }
View Full Code Here


    combineInputKeyCounter = taskContext.getCounters().findCounter(TaskCounter.COMBINE_INPUT_RECORDS);
    combineInputValueCounter = taskContext.getCounters().findCounter(TaskCounter.COMBINE_OUTPUT_RECORDS);
   
    boolean isMap = conf.getBoolean(MRConfig.IS_MAP_PROCESSOR,false);
    this.mrTaskAttemptID = new TaskAttemptID(
        new TaskID(String.valueOf(taskContext.getApplicationId()
            .getClusterTimestamp()), taskContext.getApplicationId().getId(),
            isMap ? TaskType.MAP : TaskType.REDUCE,
            taskContext.getTaskIndex()), taskContext.getTaskAttemptNumber());
   
    LOG.info("Using combineKeyClass: " + keyClass + ", combineValueClass: " + valClass + ", combineComparator: " +comparator + ", useNewApi: " + useNewApi);
View Full Code Here

    return hcatShimInstance;
  }
  private final class HCatHadoopShims20S implements HCatHadoopShims {
    @Override
    public TaskID createTaskID() {
      return new TaskID();
    }
View Full Code Here

        HistoryEventEmitter thatg) {
      if (taskIDName == null) {
        return null;
      }

      TaskID taskID = TaskID.forName(taskIDName);

      String taskType = line.get("TASK_TYPE");
      String startTime = line.get("START_TIME");
      String splits = line.get("SPLITS");
View Full Code Here

        HistoryEventEmitter thatg) {
      if (taskIDName == null) {
        return null;
      }

      TaskID taskID = TaskID.forName(taskIDName);

      String finishTime = line.get("FINISH_TIME");

      if (finishTime != null) {
        return new TaskUpdatedEvent(taskID, Long.parseLong(finishTime));
View Full Code Here

        HistoryEventEmitter thatg) {
      if (taskIDName == null) {
        return null;
      }

      TaskID taskID = TaskID.forName(taskIDName);

      String status = line.get("TASK_STATUS");
      String finishTime = line.get("FINISH_TIME");

      String error = line.get("ERROR");
View Full Code Here

        HistoryEventEmitter thatg) {
      if (taskIDName == null) {
        return null;
      }

      TaskID taskID = TaskID.forName(taskIDName);

      String status = line.get("TASK_STATUS");
      String finishTime = line.get("FINISH_TIME");

      String taskType = line.get("TASK_TYPE");
View Full Code Here

    return hcatShimInstance;
  }
  private final class HCatHadoopShims23 implements HCatHadoopShims {
    @Override
    public TaskID createTaskID() {
      return new TaskID("", 0, TaskType.MAP, 0);
    }
View Full Code Here

   * @return a string like $name-[mr]-$id$extension
   */
  public synchronized static String getUniqueFile(TaskAttemptContext context,
                                                  String name,
                                                  String extension) {
    TaskID taskId = context.getTaskAttemptID().getTaskID();
    int partition = taskId.getId();
    StringBuilder result = new StringBuilder();
    result.append(name);
    result.append('-');
    result.append(taskId.isMap() ? 'm' : 'r');
    result.append('-');
    result.append(NUMBER_FORMAT.format(partition));
    result.append(extension);
    return result.toString();
  }
View Full Code Here

   *          raw {@link TaskID} read from trace
   * @return masked {@link TaskID} with empty {@link JobID}.
   */
  private TaskID maskTaskID(TaskID taskId) {
    JobID jobId = new JobID();
    return new TaskID(jobId, taskId.isMap(), taskId.getId());
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapreduce.TaskID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.