/** * Handler for {@link UnregisterComponentInstance} * * unregister a component. At the time this message is received, * the component may not have been registered * @param id the component */ public void unregisterComponent(ContainerId id) { log.info("Unregistering component {}", id); if (yarnRegistryOperations == null) { log.warn("Processing unregister component event before initialization " + "completed; init flag ={}", initCompleted); return; } String cid = RegistryPathUtils.encodeYarnID(id.toString()); try { yarnRegistryOperations.deleteComponent(cid); } catch (IOException e) { log.warn("Failed to delete container {} : {}", id, e, e); } }
/** * Handler for {@link UnregisterComponentInstance} * * unregister a component. At the time this message is received, * the component may not have been registered * @param id the component */ public void unregisterComponent(ContainerId id) { log.info("Unregistering component {}", id); if (yarnRegistryOperations == null) { log.warn("Processing unregister component event before initialization " + "completed; init flag ={}", initCompleted); return; } String cid = RegistryPathUtils.encodeYarnID(id.toString()); try { yarnRegistryOperations.deleteComponent(cid); } catch (IOException e) { log.warn("Failed to delete container {} : {}", id, e, e); } }