Examples of TaskType


Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

      if (disabled) {
        return;
      }

      TaskId tId = event.getTaskID();
      TaskType tType = null;
      /* event's TaskId will be null if the event type is JOB_CREATE or
       * ATTEMPT_STATUS_UPDATE
       */
      if (tId != null) {
        tType = tId.getTaskType();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    Job job = getJobFromJobIdString(jid, appCtx);
    checkAccess(job, hsr);
    TasksInfo allTasks = new TasksInfo();
    for (Task task : job.getTasks().values()) {
      TaskType ttype = null;
      if (type != null && !type.isEmpty()) {
        try {
          ttype = MRApps.taskType(type);
        } catch (YarnException e) {
          throw new BadRequestException("tasktype must be either m or r");
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    @Override
    public GetTaskReportsResponse getTaskReports(
        GetTaskReportsRequest request) throws YarnRemoteException {
      JobId jobId = request.getJobId();
      TaskType taskType = request.getTaskType();
     
      GetTaskReportsResponse response =
        recordFactory.newRecordInstance(GetTaskReportsResponse.class);
     
      Job job = verifyAndGetJob(jobId, false);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    }

    @Override
    public GetTaskReportsResponse getTaskReports(GetTaskReportsRequest request) throws YarnRemoteException {
      JobId jobId = request.getJobId();
      TaskType taskType = request.getTaskType();

      GetTaskReportsResponse response = recordFactory.newRecordInstance(GetTaskReportsResponse.class);
      Job job = verifyAndGetJob(jobId);
      Collection<Task> tasks = job.getTasks(taskType).values();
      for (Task task : tasks) {
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    int reduces;
    int completedMaps;
    int completedReduces;

    void incr(Task task) {
      TaskType type = task.getType();
      boolean finished = task.isFinished();
      if (type == TaskType.MAP) {
        if (finished) {
          ++completedMaps;
        }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

  @Test public void testTaskIDtoString() {
    TaskId tid = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(TaskId.class);
    tid.setJobId(RecordFactoryProvider.getRecordFactory(null).newRecordInstance(JobId.class));
    tid.getJobId().setAppId(RecordFactoryProvider.getRecordFactory(null).newRecordInstance(ApplicationId.class));
    tid.setTaskType(TaskType.MAP);
    TaskType type = tid.getTaskType();
    System.err.println(type);
    type = TaskType.REDUCE;
    System.err.println(type);
    System.err.println(tid.getTaskType());
    assertEquals("task_0_0_0_m_0", MRApps.toString(tid));
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

      finishTime = clock.getTime();
    }
  }

  private static long computeSlotMillis(TaskAttemptImpl taskAttempt) {
    TaskType taskType = taskAttempt.getID().getTaskId().getTaskType();
    int slotMemoryReq =
        taskAttempt.getMemoryRequired(taskAttempt.conf, taskType);

    int minSlotMemSize =
        taskAttempt.appContext.getClusterInfo().getMinContainerCapability()
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    return slotMillisIncrement;
  }

  private static JobCounterUpdateEvent createJobCounterUpdateEventTAFailed(
      TaskAttemptImpl taskAttempt) {
    TaskType taskType = taskAttempt.getID().getTaskId().getTaskType();
    JobCounterUpdateEvent jce = new JobCounterUpdateEvent(taskAttempt.getID().getTaskId().getJobId());
   
    long slotMillisIncrement = computeSlotMillis(taskAttempt);
   
    if (taskType == TaskType.MAP) {
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    return jce;
  }
 
  private static JobCounterUpdateEvent createJobCounterUpdateEventTAKilled(
      TaskAttemptImpl taskAttempt) {
    TaskType taskType = taskAttempt.getID().getTaskId().getTaskType();
    JobCounterUpdateEvent jce = new JobCounterUpdateEvent(taskAttempt.getID().getTaskId().getJobId());
   
    long slotMillisIncrement = computeSlotMillis(taskAttempt);
   
    if (taskType == TaskType.MAP) {
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.TaskType

    @Override
    public GetTaskReportsResponse getTaskReports(
        GetTaskReportsRequest request) throws YarnRemoteException {
      JobId jobId = request.getJobId();
      TaskType taskType = request.getTaskType();
     
      GetTaskReportsResponse response =
        recordFactory.newRecordInstance(GetTaskReportsResponse.class);
     
      Job job = verifyAndGetJob(jobId, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.