Java Code Examples for org.apache.hadoop.mapreduce.TaskType#name()

The following examples show how to use org.apache.hadoop.mapreduce.TaskType#name() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TaskAttemptStartedEvent.java    From hadoop with Apache License 2.0 6 votes vote down vote up
/**
 * 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);
  }
}
 
Example 2
Source File: TaskAttemptStartedEvent.java    From big-c with Apache License 2.0 6 votes vote down vote up
/**
 * 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);
  }
}
 
Example 3
Source File: TaskStartedEvent.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/**
 * 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());
}
 
Example 4
Source File: TaskStartedEvent.java    From big-c with Apache License 2.0 5 votes vote down vote up
/**
 * 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());
}