containerMemoryTracker); return new BasicContainerLauncher(conf, supervisorId, supervisorPort, resourceIsolationManager, metricsRegistry, containerMemoryTracker);
/** * Factory to create the right container launcher * for the config and the environment. * @param conf the config * @param supervisorId the ID of the supervisor * @param sharedContext Used in local mode to let workers talk together without netty * @return the proper container launcher * @throws IOException on any error */ public static ContainerLauncher make(Map<String, Object> conf, String supervisorId, IContext sharedContext) throws IOException { if (ConfigUtils.isLocalMode(conf)) { return new LocalContainerLauncher(conf, supervisorId, sharedContext); } if (Utils.getBoolean(conf.get(Config.SUPERVISOR_RUN_WORKER_AS_USER), false)) { return new RunAsUserContainerLauncher(conf, supervisorId); } return new BasicContainerLauncher(conf, supervisorId); }