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


Java TaskType.name方法代碼示例

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


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

示例1: TaskAttemptStartedEvent

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
/**
 * Create an event to record the start of an attempt
 * @param attemptId Id of the attempt
 * @param taskType Type of task
 * @param startTime Start time of the attempt
 * @param trackerName Name of the Task Tracker where attempt is running
 * @param httpPort The port number of the tracker
 * @param shufflePort The shuffle port number of the container
 * @param containerId The containerId for the task attempt.
 * @param locality The locality of the task attempt
 * @param avataar The avataar of the task attempt
 */
public TaskAttemptStartedEvent( TaskAttemptID attemptId,  
    TaskType taskType, long startTime, String trackerName,
    int httpPort, int shufflePort, ContainerId containerId,
    String locality, String avataar) {
  datum.attemptId = new Utf8(attemptId.toString());
  datum.taskid = new Utf8(attemptId.getTaskID().toString());
  datum.startTime = startTime;
  datum.taskType = new Utf8(taskType.name());
  datum.trackerName = new Utf8(trackerName);
  datum.httpPort = httpPort;
  datum.shufflePort = shufflePort;
  datum.containerId = new Utf8(containerId.toString());
  if (locality != null) {
    datum.locality = new Utf8(locality);
  }
  if (avataar != null) {
    datum.avataar = new Utf8(avataar);
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:32,代碼來源:TaskAttemptStartedEvent.java

示例2: TaskStartedEvent

import org.apache.hadoop.mapreduce.TaskType; //導入方法依賴的package包/類
/**
 * Create an event to record start of a task
 * @param id Task Id
 * @param startTime Start time of the task
 * @param taskType Type of the task
 * @param splitLocations Split locations, applicable for map tasks
 */
public TaskStartedEvent(TaskID id, long startTime, 
    TaskType taskType, String splitLocations) {
  datum.taskid = new Utf8(id.toString());
  datum.splitLocations = new Utf8(splitLocations);
  datum.startTime = startTime;
  datum.taskType = new Utf8(taskType.name());
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:15,代碼來源:TaskStartedEvent.java


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