@Override public void unregister( org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID, WrappedJvmID jvmID) { // Unregistration also comes from the same TaskAttempt which does the // registration. Events are ordered at TaskAttempt, so unregistration will // always come after registration. // Remove from launchedJVMs before jvmIDToActiveAttemptMap to avoid // synchronization issue with getTask(). getTask should be checking // jvmIDToActiveAttemptMap before it checks launchedJVMs. // remove the mappings if not already removed launchedJVMs.remove(jvmID); jvmIDToActiveAttemptMap.remove(jvmID); //unregister this attempt taskHeartbeatHandler.unregister(attemptID); }
@Override public void unregister( org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID, WrappedJvmID jvmID) { // Unregistration also comes from the same TaskAttempt which does the // registration. Events are ordered at TaskAttempt, so unregistration will // always come after registration. // Remove from launchedJVMs before jvmIDToActiveAttemptMap to avoid // synchronization issue with getTask(). getTask should be checking // jvmIDToActiveAttemptMap before it checks launchedJVMs. // remove the mappings if not already removed launchedJVMs.remove(jvmID); jvmIDToActiveAttemptMap.remove(jvmID); //unregister this attempt taskHeartbeatHandler.unregister(attemptID); }
@Override public void unregister( org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID, WrappedJvmID jvmID) { // Unregistration also comes from the same TaskAttempt which does the // registration. Events are ordered at TaskAttempt, so unregistration will // always come after registration. // Remove from launchedJVMs before jvmIDToActiveAttemptMap to avoid // synchronization issue with getTask(). getTask should be checking // jvmIDToActiveAttemptMap before it checks launchedJVMs. // remove the mappings if not already removed launchedJVMs.remove(jvmID); jvmIDToActiveAttemptMap.remove(jvmID); //unregister this attempt taskHeartbeatHandler.unregister(attemptID); attemptIdToStatus.remove(attemptID); }
hb.register(taid); Assert.assertFalse(hb.hasRecentlyUnregistered(taid)); hb.unregister(taid); Assert.assertTrue(hb.hasRecentlyUnregistered(taid)); long unregisterTimeout = conf.getLong(MRJobConfig.TASK_EXIT_TIMEOUT,