@Override public boolean equals(Object o) { if (this == o) { return true; } if(o == null) { return false; } if (o.getClass() == this.getClass()) { TaskAttemptIdentifierImpl other = (TaskAttemptIdentifierImpl) o; return this.attemptId.equals(other.attemptId); } else { return false; } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; EventMetaData other = (EventMetaData) obj; if (edgeVertexName == null) { if (other.edgeVertexName != null) return false; } else if (!edgeVertexName.equals(other.edgeVertexName)) return false; if (producerConsumerType != other.producerConsumerType) return false; if (taskAttemptID == null) { if (other.taskAttemptID != null) return false; } else if (!taskAttemptID.equals(other.taskAttemptID)) return false; if (taskVertexName == null) { if (other.taskVertexName != null) return false; } else if (!taskVertexName.equals(other.taskVertexName)) return false; return true; }
private void killUnfinishedAttempt(TaskAttempt attempt, String logMsg, TaskAttemptTerminationCause errorCause) { if (commitAttempt != null && commitAttempt.equals(attempt.getID())) { LOG.info("Unsetting commit attempt: " + commitAttempt + " since attempt is being killed"); commitAttempt = null; } if (attempt != null && !attempt.isFinished()) { eventHandler.handle(new TaskAttemptEventKillRequest(attempt.getID(), logMsg, errorCause)); } }
if (commitAttempt.equals(taskAttemptID)) { if (LOG.isDebugEnabled()) { LOG.debug(taskAttemptID + " already given a go for committing the task output.");
@Override public TaskStateInternal transition(TaskImpl task, TaskEvent event) { TaskEventTAUpdate attemptEvent = (TaskEventTAUpdate) event; TezTaskAttemptID attemptId = attemptEvent.getTaskAttemptID(); TaskStateInternal resultState = TaskStateInternal.SUCCEEDED; if(task.successfulAttempt.equals(attemptId)) { // typically we are here because this map task was run on a bad node and // we want to reschedule it on a different node. // Depending on whether there are previous failed attempts or not this // can SCHEDULE or RESCHEDULE the container allocate request. If this // SCHEDULE's then the dataLocal hosts of this taskAttempt will be used // from the map splitInfo. So the bad node might be sent as a location // to the RM. But the RM would ignore that just like it would ignore // currently pending container requests affinitized to bad nodes. unSucceed(task); task.eventHandler.handle(new VertexEventTaskReschedule(task.taskId)); resultState = TaskStateInternal.SCHEDULED; } ATTEMPT_KILLED_TRANSITION.transition(task, event); return resultState; } }
for (EventInfo eventInfo : onDemandRouteEvents) { if (eventInfo.eventEdge == srcEdge && eventInfo.tezEvent.getSourceInfo().getTaskAttemptID().equals( tezEvent.getSourceInfo().getTaskAttemptID()) && (eventInfo.tezEvent.getEventType() == EventType.DATA_MOVEMENT_EVENT
@Override public void transition(TaskImpl task, TaskEvent event) { TaskEventTAUpdate castEvent = (TaskEventTAUpdate) event; task.addDiagnosticInfo("TaskAttempt " + castEvent.getTaskAttemptID().getId() + " killed"); if (task.commitAttempt !=null && castEvent.getTaskAttemptID().equals(task.commitAttempt)) { task.commitAttempt = null; } task.handleTaskAttemptCompletion( castEvent.getTaskAttemptID(), TaskAttemptStateInternal.KILLED); // we KillWaitAttemptCompletedTransitionready have a spare task.taskAttemptStatus.put(castEvent.getTaskAttemptID().getId(), true); task.getVertex().incrementKilledTaskAttemptCount(); if (task.shouldScheduleNewAttempt()) { task.addAndScheduleAttempt(castEvent.getTaskAttemptID()); } } }
+ " info=" + task.getAttempt(castEvent.getTaskAttemptID()).getDiagnostics()); if (task.commitAttempt != null && castEvent.getTaskAttemptID().equals(task.commitAttempt)) { task.commitAttempt = null;
!failedAttemptId.equals(task.successfulAttempt)) {