當前位置: 首頁>>代碼示例>>Java>>正文


Java TaskType.valueOf方法代碼示例

本文整理匯總了Java中org.apache.hadoop.mapreduce.TaskType.valueOf方法的典型用法代碼示例。如果您正苦於以下問題:Java TaskType.valueOf方法的具體用法?Java TaskType.valueOf怎麽用?Java TaskType.valueOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.hadoop.mapreduce.TaskType的用法示例。


在下文中一共展示了TaskType.valueOf方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setDatum

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
public void setDatum(Object oDatum) {
  this.datum = (ReduceAttemptFinished)oDatum;
  this.attemptId = TaskAttemptID.forName(datum.attemptId.toString());
  this.taskType = TaskType.valueOf(datum.taskType.toString());
  this.taskStatus = datum.taskStatus.toString();
  this.shuffleFinishTime = datum.shuffleFinishTime;
  this.sortFinishTime = datum.sortFinishTime;
  this.finishTime = datum.finishTime;
  this.hostname = datum.hostname.toString();
  this.rackName = datum.rackname.toString();
  this.port = datum.port;
  this.state = datum.state.toString();
  this.counters = EventReader.fromAvro(datum.counters);
  this.clockSplits = AvroArrayUtils.fromAvro(datum.clockSplits);
  this.cpuUsages = AvroArrayUtils.fromAvro(datum.cpuUsages);
  this.gpuUsages = AvroArrayUtils.fromAvro(datum.gpuUsages);
  this.vMemKbytes = AvroArrayUtils.fromAvro(datum.vMemKbytes);
  this.physMemKbytes = AvroArrayUtils.fromAvro(datum.physMemKbytes);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:20,代碼來源:ReduceAttemptFinishedEvent.java

示例2: setDatum

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
public void setDatum(Object odatum) {
  this.datum =
      (TaskAttemptUnsuccessfulCompletion)odatum;
  this.attemptId =
      TaskAttemptID.forName(datum.attemptId.toString());
  this.taskType =
      TaskType.valueOf(datum.taskType.toString());
  this.finishTime = datum.finishTime;
  this.hostname = datum.hostname.toString();
  this.rackName = datum.rackname.toString();
  this.port = datum.port;
  this.status = datum.status.toString();
  this.error = datum.error.toString();
  this.counters =
      EventReader.fromAvro(datum.counters);
  this.clockSplits =
      AvroArrayUtils.fromAvro(datum.clockSplits);
  this.cpuUsages =
      AvroArrayUtils.fromAvro(datum.cpuUsages);
  this.gpuUsages =
      AvroArrayUtils.fromAvro(datum.gpuUsages);
  this.vMemKbytes =
      AvroArrayUtils.fromAvro(datum.vMemKbytes);
  this.physMemKbytes =
      AvroArrayUtils.fromAvro(datum.physMemKbytes);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:27,代碼來源:TaskAttemptUnsuccessfulCompletionEvent.java

示例3: setDatum

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
public void setDatum(Object odatum) {
  this.datum = (TaskFailed)odatum;
  this.id =
      TaskID.forName(datum.taskid.toString());
  this.taskType =
      TaskType.valueOf(datum.taskType.toString());
  this.finishTime = datum.finishTime;
  this.error = datum.error.toString();
  this.failedDueToAttempt =
      datum.failedDueToAttempt == null
      ? null
      : TaskAttemptID.forName(
          datum.failedDueToAttempt.toString());
  this.status = datum.status.toString();
  this.counters =
      EventReader.fromAvro(datum.counters);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:18,代碼來源:TaskFailedEvent.java

示例4: setDatum

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
public void setDatum(Object oDatum) {
  this.datum = (MapAttemptFinished)oDatum;
  this.attemptId = TaskAttemptID.forName(datum.attemptId.toString());
  this.taskType = TaskType.valueOf(datum.taskType.toString());
  this.taskStatus = datum.taskStatus.toString();
  this.mapFinishTime = datum.mapFinishTime;
  this.finishTime = datum.finishTime;
  this.hostname = datum.hostname.toString();
  this.rackName = datum.rackname.toString();
  this.port = datum.port;
  this.state = datum.state.toString();
  this.counters = EventReader.fromAvro(datum.counters);
  this.clockSplits = AvroArrayUtils.fromAvro(datum.clockSplits);
  this.cpuUsages = AvroArrayUtils.fromAvro(datum.cpuUsages);
  this.gpuUsages = AvroArrayUtils.fromAvro(datum.gpuUsages);
  this.vMemKbytes = AvroArrayUtils.fromAvro(datum.vMemKbytes);
  this.physMemKbytes = AvroArrayUtils.fromAvro(datum.physMemKbytes);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:19,代碼來源:MapAttemptFinishedEvent.java

示例5: setDatum

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
public void setDatum(Object oDatum) {
  this.datum = (TaskFinished)oDatum;
  this.taskid = TaskID.forName(datum.taskid.toString());
  if (datum.successfulAttemptId != null) {
    this.successfulAttemptId = TaskAttemptID
        .forName(datum.successfulAttemptId.toString());
  }
  this.finishTime = datum.finishTime;
  this.taskType = TaskType.valueOf(datum.taskType.toString());
  this.status = datum.status.toString();
  this.counters = EventReader.fromAvro(datum.counters);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:13,代碼來源:TaskFinishedEvent.java

示例6: setDatum

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
public void setDatum(Object oDatum) {
  this.datum = (TaskAttemptFinished)oDatum;
  this.attemptId = TaskAttemptID.forName(datum.attemptId.toString());
  this.taskType = TaskType.valueOf(datum.taskType.toString());
  this.taskStatus = datum.taskStatus.toString();
  this.finishTime = datum.finishTime;
  this.rackName = datum.rackname.toString();
  this.hostname = datum.hostname.toString();
  this.state = datum.state.toString();
  this.counters = EventReader.fromAvro(datum.counters);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:12,代碼來源:TaskAttemptFinishedEvent.java

示例7: get20TaskType

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
static TaskType get20TaskType(String taskType) {
  try {
    return TaskType.valueOf(taskType);
  } catch (IllegalArgumentException e) {
    if ("CLEANUP".equals(taskType)) {
      return TaskType.JOB_CLEANUP;
    }

    if ("SETUP".equals(taskType)) {
      return TaskType.JOB_SETUP;
    }

    return null;
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:16,代碼來源:Version20LogInterfaceUtils.java

示例8: getTaskType

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
/** Get the task type */
public TaskType getTaskType() {
  return TaskType.valueOf(taskType.toString());
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:5,代碼來源:TaskAttemptUnsuccessfulCompletionEvent.java

示例9: getTaskType

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
/** Get the task type */
public TaskType getTaskType() {
  return TaskType.valueOf(datum.taskType.toString());
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:5,代碼來源:TaskStartedEvent.java


注:本文中的org.apache.hadoop.mapreduce.TaskType.valueOf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。