/** * Unregisters the TaskManager with the given instance id. Unregistering means to mark * the given instance as dead and notify {@link InstanceListener} about the dead instance. * * @param instanceId TaskManager which is about to be marked dead. */ public void unregisterTaskManager(InstanceID instanceId, boolean terminated){ Instance instance = registeredHostsById.get(instanceId); if (instance != null){ registeredHostsById.remove(instance.getId()); registeredHostsByResource.remove(instance.getTaskManagerID()); if (terminated) { deadHosts.add(instance.getTaskManagerID()); } instance.markDead(); totalNumberOfAliveTaskSlots -= instance.getTotalNumberOfSlots(); notifyDeadInstance(instance); LOG.info( "Unregistered task manager " + instance.getTaskManagerLocation().addressString() + ". Number of registered task managers " + getNumberOfRegisteredTaskManagers() + ". Number of available slots " + getTotalNumberOfSlots() + "."); } else { LOG.warn("Tried to unregister instance {} but it is not registered.", instanceId); } }
/** * Unregisters the TaskManager with the given instance id. Unregistering means to mark * the given instance as dead and notify {@link InstanceListener} about the dead instance. * * @param instanceId TaskManager which is about to be marked dead. */ public void unregisterTaskManager(InstanceID instanceId, boolean terminated){ Instance instance = registeredHostsById.get(instanceId); if (instance != null){ registeredHostsById.remove(instance.getId()); registeredHostsByResource.remove(instance.getTaskManagerID()); if (terminated) { deadHosts.add(instance.getTaskManagerID()); } instance.markDead(); totalNumberOfAliveTaskSlots -= instance.getTotalNumberOfSlots(); notifyDeadInstance(instance); LOG.info( "Unregistered task manager " + instance.getTaskManagerLocation().addressString() + ". Number of registered task managers " + getNumberOfRegisteredTaskManagers() + ". Number of available slots " + getTotalNumberOfSlots() + "."); } else { LOG.warn("Tried to unregister instance {} but it is not registered.", instanceId); } }
if (prior != null) { throw new IllegalStateException("Registration attempt from TaskManager at " + taskManagerLocation.addressString() + ". This connection is already registered under ID " + prior.getId()); LOG.info("Registering TaskManager at " + taskManagerLocation.addressString() + " which was marked as dead earlier because of a heart-beat timeout.");
if (prior != null) { throw new IllegalStateException("Registration attempt from TaskManager at " + taskManagerLocation.addressString() + ". This connection is already registered under ID " + prior.getId()); LOG.info("Registering TaskManager at " + taskManagerLocation.addressString() + " which was marked as dead earlier because of a heart-beat timeout.");
if (prior != null) { throw new IllegalStateException("Registration attempt from TaskManager at " + taskManagerLocation.addressString() + ". This connection is already registered under ID " + prior.getId()); LOG.info("Registering TaskManager at " + taskManagerLocation.addressString() + " which was marked as dead earlier because of a heart-beat timeout.");
/** * Unregisters the TaskManager with the given instance id. Unregistering means to mark * the given instance as dead and notify {@link InstanceListener} about the dead instance. * * @param instanceId TaskManager which is about to be marked dead. */ public void unregisterTaskManager(InstanceID instanceId, boolean terminated){ Instance instance = registeredHostsById.get(instanceId); if (instance != null){ registeredHostsById.remove(instance.getId()); registeredHostsByResource.remove(instance.getTaskManagerID()); if (terminated) { deadHosts.add(instance.getTaskManagerID()); } instance.markDead(); totalNumberOfAliveTaskSlots -= instance.getTotalNumberOfSlots(); notifyDeadInstance(instance); LOG.info( "Unregistered task manager " + instance.getTaskManagerLocation().addressString() + ". Number of registered task managers " + getNumberOfRegisteredTaskManagers() + ". Number of available slots " + getTotalNumberOfSlots() + "."); } else { LOG.warn("Tried to unregister instance {} but it is not registered.", instanceId); } }
if (prior != null) { throw new IllegalStateException("Registration attempt from TaskManager at " + taskManagerLocation.addressString() + ". This connection is already registered under ID " + prior.getId()); LOG.info("Registering TaskManager at " + taskManagerLocation.addressString() + " which was marked as dead earlier because of a heart-beat timeout.");
/** * Unregisters the TaskManager with the given instance id. Unregistering means to mark * the given instance as dead and notify {@link InstanceListener} about the dead instance. * * @param instanceId TaskManager which is about to be marked dead. */ public void unregisterTaskManager(InstanceID instanceId, boolean terminated){ Instance instance = registeredHostsById.get(instanceId); if (instance != null){ registeredHostsById.remove(instance.getId()); registeredHostsByResource.remove(instance.getTaskManagerID()); if (terminated) { deadHosts.add(instance.getTaskManagerID()); } instance.markDead(); totalNumberOfAliveTaskSlots -= instance.getTotalNumberOfSlots(); notifyDeadInstance(instance); LOG.info( "Unregistered task manager " + instance.getTaskManagerLocation().addressString() + ". Number of registered task managers " + getNumberOfRegisteredTaskManagers() + ". Number of available slots " + getTotalNumberOfSlots() + "."); } else { LOG.warn("Tried to unregister instance {} but it is not registered.", instanceId); } }