Java 类org.apache.hadoop.mapreduce.jobhistory.TaskAttemptUnsuccessfulCompletion 实例源码

项目:hadoop    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hadoop    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetGpuUsages(event.getGpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:aliyun-oss-hadoop-fs    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:aliyun-oss-hadoop-fs    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:big-c    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:big-c    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hadoop-2.6.0-cdh5.4.3    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:hadoop-plus    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hadoop-plus    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:FlexMap    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hops    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hops    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:hadoop-TCP    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hadoop-TCP    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:hardfs    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hardfs    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}
项目:hadoop-on-lustre2    文件:TestTaskAttempt.java   
protected EventHandler<JobHistoryEvent> createJobHistoryHandler(
    AppContext context) {
  return new EventHandler<JobHistoryEvent>() {
    @Override
    public void handle(JobHistoryEvent event) {
      if (event.getType() == org.apache.hadoop.mapreduce.jobhistory.EventType.MAP_ATTEMPT_FAILED) {
        TaskAttemptUnsuccessfulCompletion datum = (TaskAttemptUnsuccessfulCompletion) event
            .getHistoryEvent().getDatum();
        Assert.assertEquals("Diagnostic Information is not Correct",
            "Test Diagnostic Event", datum.get(8).toString());
      }
    }
  };
}
项目:hadoop-on-lustre2    文件:JobBuilder.java   
private void processTaskAttemptUnsuccessfulCompletionEvent(
    TaskAttemptUnsuccessfulCompletionEvent event) {
  ParsedTaskAttempt attempt =
      getOrMakeTaskAttempt(event.getTaskType(), event.getTaskId().toString(),
          event.getTaskAttemptId().toString());

  if (attempt == null) {
    return;
  }

  attempt.setResult(getPre21Value(event.getTaskStatus()));
  attempt.setHostName(event.getHostname(), event.getRackName());
  ParsedHost pHost = 
    getAndRecordParsedHost(event.getRackName(), event.getHostname());
  if (pHost != null) {
    attempt.setLocation(pHost.makeLoggedLocation());
  }

  attempt.setFinishTime(event.getFinishTime());
  org.apache.hadoop.mapreduce.jobhistory.JhCounters counters =
      ((TaskAttemptUnsuccessfulCompletion) event.getDatum()).counters;
  attempt.incorporateCounters(
      counters == null ? EMPTY_COUNTERS : counters);
  attempt.arraySetClockSplits(event.getClockSplits());
  attempt.arraySetCpuUsages(event.getCpuUsages());
  attempt.arraySetVMemKbytes(event.getVMemKbytes());
  attempt.arraySetPhysMemKbytes(event.getPhysMemKbytes());
  TaskAttemptUnsuccessfulCompletion t =
      (TaskAttemptUnsuccessfulCompletion) (event.getDatum());
  attempt.putDiagnosticInfo(t.error.toString());
}