use of com.continuuity.weave.internal.WeaveContainerController in project weave by continuuity.
the class RunningContainers method start.
void start(String runnableName, ContainerInfo containerInfo, WeaveContainerLauncher launcher) {
containerLock.lock();
try {
int instanceId = getStartInstanceId(runnableName);
RunId runId = getRunId(runnableName, instanceId);
WeaveContainerController controller = launcher.start(runId, instanceId, WeaveContainerMain.class, "$HADOOP_CONF_DIR");
containers.put(runnableName, containerInfo.getId(), controller);
WeaveRunResources resources = new DefaultWeaveRunResources(instanceId, containerInfo.getId(), containerInfo.getVirtualCores(), containerInfo.getMemoryMB(), containerInfo.getHost().getHostName());
resourceReport.addRunResources(runnableName, resources);
if (startSequence.isEmpty() || !runnableName.equals(startSequence.peekLast())) {
startSequence.addLast(runnableName);
}
containerChange.signalAll();
} finally {
containerLock.unlock();
}
}
Aggregations