Java Code Examples for org.apache.hadoop.mapreduce.TaskID#forName()
The following examples show how to use
org.apache.hadoop.mapreduce.TaskID#forName() .
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: TaskFailedEvent.java From hadoop with Apache License 2.0 | 6 votes |
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); }
Example 2
Source File: Task20LineHistoryEventEmitter.java From hadoop with Apache License 2.0 | 6 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String taskType = line.get("TASK_TYPE"); String startTime = line.get("START_TIME"); String splits = line.get("SPLITS"); if (startTime != null && taskType != null) { Task20LineHistoryEventEmitter that = (Task20LineHistoryEventEmitter) thatg; that.originalStartTime = Long.parseLong(startTime); that.originalTaskType = Version20LogInterfaceUtils.get20TaskType(taskType); return new TaskStartedEvent(taskID, that.originalStartTime, that.originalTaskType, splits); } return null; }
Example 3
Source File: Task20LineHistoryEventEmitter.java From hadoop with Apache License 2.0 | 6 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String finishTime = line.get("FINISH_TIME"); if (finishTime != null) { return new TaskUpdatedEvent(taskID, Long.parseLong(finishTime)); } return null; }
Example 4
Source File: Task20LineHistoryEventEmitter.java From big-c with Apache License 2.0 | 6 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String finishTime = line.get("FINISH_TIME"); if (finishTime != null) { return new TaskUpdatedEvent(taskID, Long.parseLong(finishTime)); } return null; }
Example 5
Source File: Task20LineHistoryEventEmitter.java From big-c with Apache License 2.0 | 6 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String taskType = line.get("TASK_TYPE"); String startTime = line.get("START_TIME"); String splits = line.get("SPLITS"); if (startTime != null && taskType != null) { Task20LineHistoryEventEmitter that = (Task20LineHistoryEventEmitter) thatg; that.originalStartTime = Long.parseLong(startTime); that.originalTaskType = Version20LogInterfaceUtils.get20TaskType(taskType); return new TaskStartedEvent(taskID, that.originalStartTime, that.originalTaskType, splits); } return null; }
Example 6
Source File: TaskFailedEvent.java From big-c with Apache License 2.0 | 6 votes |
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); }
Example 7
Source File: TaskFinishedEvent.java From hadoop with Apache License 2.0 | 5 votes |
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); }
Example 8
Source File: Task20LineHistoryEventEmitter.java From big-c with Apache License 2.0 | 5 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String status = line.get("TASK_STATUS"); String finishTime = line.get("FINISH_TIME"); String taskType = line.get("TASK_TYPE"); String error = line.get("ERROR"); if (finishTime != null && (error != null || (status != null && !status .equalsIgnoreCase("success")))) { Task20LineHistoryEventEmitter that = (Task20LineHistoryEventEmitter) thatg; TaskType originalTaskType = that.originalTaskType == null ? Version20LogInterfaceUtils .get20TaskType(taskType) : that.originalTaskType; return new TaskFailedEvent(taskID, Long.parseLong(finishTime), originalTaskType, error, status, null); } return null; }
Example 9
Source File: Task20LineHistoryEventEmitter.java From big-c with Apache License 2.0 | 5 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String status = line.get("TASK_STATUS"); String finishTime = line.get("FINISH_TIME"); String error = line.get("ERROR"); String counters = line.get("COUNTERS"); if (finishTime != null && error == null && (status != null && status.equalsIgnoreCase("success"))) { Counters eventCounters = maybeParseCounters(counters); Task20LineHistoryEventEmitter that = (Task20LineHistoryEventEmitter) thatg; if (that.originalTaskType == null) { return null; } return new TaskFinishedEvent(taskID, null, Long.parseLong(finishTime), that.originalTaskType, status, eventCounters); } return null; }
Example 10
Source File: Task20LineHistoryEventEmitter.java From hadoop with Apache License 2.0 | 5 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String status = line.get("TASK_STATUS"); String finishTime = line.get("FINISH_TIME"); String error = line.get("ERROR"); String counters = line.get("COUNTERS"); if (finishTime != null && error == null && (status != null && status.equalsIgnoreCase("success"))) { Counters eventCounters = maybeParseCounters(counters); Task20LineHistoryEventEmitter that = (Task20LineHistoryEventEmitter) thatg; if (that.originalTaskType == null) { return null; } return new TaskFinishedEvent(taskID, null, Long.parseLong(finishTime), that.originalTaskType, status, eventCounters); } return null; }
Example 11
Source File: Task20LineHistoryEventEmitter.java From hadoop with Apache License 2.0 | 5 votes |
HistoryEvent maybeEmitEvent(ParsedLine line, String taskIDName, HistoryEventEmitter thatg) { if (taskIDName == null) { return null; } TaskID taskID = TaskID.forName(taskIDName); String status = line.get("TASK_STATUS"); String finishTime = line.get("FINISH_TIME"); String taskType = line.get("TASK_TYPE"); String error = line.get("ERROR"); if (finishTime != null && (error != null || (status != null && !status .equalsIgnoreCase("success")))) { Task20LineHistoryEventEmitter that = (Task20LineHistoryEventEmitter) thatg; TaskType originalTaskType = that.originalTaskType == null ? Version20LogInterfaceUtils .get20TaskType(taskType) : that.originalTaskType; return new TaskFailedEvent(taskID, Long.parseLong(finishTime), originalTaskType, error, status, null); } return null; }
Example 12
Source File: TaskFinishedEvent.java From big-c with Apache License 2.0 | 5 votes |
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); }
Example 13
Source File: LoggedTask.java From big-c with Apache License 2.0 | 4 votes |
void setTaskID(String taskID) { this.taskID = TaskID.forName(taskID); }
Example 14
Source File: TaskAttemptStartedEvent.java From big-c with Apache License 2.0 | 4 votes |
/** Get the task id */ public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
Example 15
Source File: TaskUpdatedEvent.java From big-c with Apache License 2.0 | 4 votes |
/** Get the task ID */ public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
Example 16
Source File: TaskStartedEvent.java From big-c with Apache License 2.0 | 4 votes |
/** Get the task id */ public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
Example 17
Source File: LoggedTask.java From hadoop with Apache License 2.0 | 4 votes |
void setTaskID(String taskID) { this.taskID = TaskID.forName(taskID); }
Example 18
Source File: TaskAttemptStartedEvent.java From hadoop with Apache License 2.0 | 4 votes |
/** Get the task id */ public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
Example 19
Source File: TaskUpdatedEvent.java From hadoop with Apache License 2.0 | 4 votes |
/** Get the task ID */ public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
Example 20
Source File: TaskStartedEvent.java From hadoop with Apache License 2.0 | 4 votes |
/** Get the task id */ public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }