@Override
public ContainerLaunchContext preLaunch(Container container, ContainerLaunchContext context) {
ContainerCluster cluster = findContainerClusterByContainer(container);
if (getResourceLocalizer() instanceof MultiResourceLocalizer) {
if (cluster != null) {
MultiResourceLocalizer loc = (MultiResourceLocalizer) getResourceLocalizer();
Map<String, LocalResource> resources = loc.getResources(clusterIdToRef.get(cluster.getId()));
context.setLocalResources(resources);
}
} else {
log.warn("Can't use container specific local resources because MultiResourceLocalizer expected instead of "
+ getResourceLocalizer());