@Override public RoleInstance getOwnedContainer(ContainerId id) { return appState.getOwnedContainer(id); }
@Override public RoleInstance getOwnedContainer(ContainerId id) { return appState.getOwnedContainer(id); }
/** * report container loss. If this isn't already known about, react * * @param containerId id of the container which has failed * @throws SliderException */ public synchronized void providerLostContainer( ContainerId containerId) throws SliderException { log.info("containerLostContactWithProvider: container {} lost", containerId); RoleInstance activeContainer = appState.getOwnedContainer(containerId); if (activeContainer != null) { execute(appState.releaseContainer(containerId)); // ask for more containers if needed log.info("Container released; triggering review"); reviewRequestAndReleaseNodes("Loss of container"); } else { log.info("Container not in active set - ignoring"); } }
/** * report container loss. If this isn't already known about, react * * @param containerId id of the container which has failed * @throws SliderException */ public synchronized void providerLostContainer( ContainerId containerId) throws SliderException { log.info("containerLostContactWithProvider: container {} lost", containerId); RoleInstance activeContainer = appState.getOwnedContainer(containerId); if (activeContainer != null) { execute(appState.releaseContainer(containerId)); // ask for more containers if needed log.info("Container released; triggering review"); reviewRequestAndReleaseNodes("Loss of container"); } else { log.info("Container not in active set - ignoring"); } }
/** * Note that a container has been submitted for release; update internal state * and mark the associated ContainerInfo released field to indicate that * while it is still in the active list, it has been queued for release. * * @param container container * @throws SliderInternalStateException if there is no container of that ID * on the active list */ public synchronized void containerReleaseSubmitted(Container container) throws SliderInternalStateException { ContainerId id = container.getId(); //look up the container RoleInstance instance = getOwnedContainer(id); if (instance == null) { throw new SliderInternalStateException( "No active container with ID " + id); } //verify that it isn't already released if (containersBeingReleased.containsKey(id)) { throw new SliderInternalStateException( "Container %s already queued for release", id); } instance.released = true; containersBeingReleased.put(id, instance.container); RoleStatus role = lookupRoleStatus(instance.roleId); role.incReleasing(); roleHistory.onContainerReleaseSubmitted(container); }
/** * Note that a container has been submitted for release; update internal state * and mark the associated ContainerInfo released field to indicate that * while it is still in the active list, it has been queued for release. * * @param container container * @throws SliderInternalStateException if there is no container of that ID * on the active list */ public synchronized void containerReleaseSubmitted(Container container) throws SliderInternalStateException { ContainerId id = container.getId(); //look up the container RoleInstance instance = getOwnedContainer(id); if (instance == null) { throw new SliderInternalStateException( "No active container with ID " + id); } //verify that it isn't already released if (containersBeingReleased.containsKey(id)) { throw new SliderInternalStateException( "Container %s already queued for release", id); } instance.released = true; containersBeingReleased.put(id, instance.container); RoleStatus role = lookupRoleStatus(instance.roleId); role.incReleasing(); roleHistory.onContainerReleaseSubmitted(container); }
public RoleInstance innerOnNodeManagerContainerStarted(ContainerId containerId) { incStartedCountainerCount(); RoleInstance instance = getOwnedContainer(containerId); if (instance == null) {
public RoleInstance innerOnNodeManagerContainerStarted(ContainerId containerId) { incStartedCountainerCount(); RoleInstance instance = getOwnedContainer(containerId); if (instance == null) {
RoleInstance instance = appState.getOwnedContainer(id); if (instance == null) { return false;
RoleInstance instance = appState.getOwnedContainer(id); if (instance == null) { return false;
assert !getLiveContainers().containsKey( containerId) : " container still in live nodes"; assert getOwnedContainer(containerId) == null : "Container still in active container list";
assert !getLiveContainers().containsKey( containerId) : " container still in live nodes"; assert getOwnedContainer(containerId) == null : "Container still in active container list";