_logger.debugf("Starting coordinator with args: %s\n", Arrays.toString(argArray)); BindPortFutures bindPortFutures = new BindPortFutures(); Thread thread = new Thread("coordinatorThread") {
public static void main(String[] args, BatfishLogger logger, BindPortFutures portFutures) { mainInit(args); // Supply ports early if known before binding int configuredPoolPort = _settings.getServicePoolPort(); if (configuredPoolPort > 0) { portFutures.getPoolPort().complete(configuredPoolPort); } int configuredWorkPort = _settings.getServiceWorkPort(); if (configuredWorkPort > 0) { portFutures.getWorkPort().complete(configuredWorkPort); } int configuredWorkV2Port = _settings.getServiceWorkV2Port(); if (configuredWorkV2Port > 0) { portFutures.getWorkV2Port().complete(configuredWorkV2Port); } _logger = logger; mainRun(portFutures); }
_client.getSettings().setCoordinatorWorkPort(bindPortFutures.getWorkPort().get()); _client.getSettings().setCoordinatorWorkV2Port(bindPortFutures.getWorkV2Port().get()); } catch (ExecutionException | InterruptedException e) { System.err.println("org.batfish.allinone: Worker initialization failed: " + e.getMessage());
"true", org.batfish.config.Settings.ARG_COORDINATOR_POOL_PORT, bindPortFutures.getPoolPort().get(), org.batfish.config.Settings.ARG_TRACING_ENABLE, _settings.getTracingEnable());
private static void initWorkManager(BindPortFutures bindPortFutures) { _workManager = new WorkMgr( _settings, _logger, new FileBasedIdManager(_settings.getContainersLocation()), new FileBasedStorage(_settings.getContainersLocation(), _logger)); _workManager.startWorkManager(); // Initialize and start the work manager service using the legacy API and Jettison. startWorkManagerService( WorkMgrService.class, Lists.newArrayList(JettisonFeature.class, MultiPartFeature.class), _settings.getServiceWorkPort(), bindPortFutures.getWorkPort()); // Initialize and start the work manager service using the v2 RESTful API and Jackson. startWorkManagerService( WorkMgrServiceV2.class, Lists.newArrayList( ServiceObjectMapper.class, JacksonFeature.class, ApiKeyAuthenticationFilter.class, VersionCompatibilityFilter.class), _settings.getServiceWorkV2Port(), bindPortFutures.getWorkV2Port()); }
.build(); _logger.infof("Started pool manager at %s\n", actualPoolMgrUri); if (!bindPortFutures.getPoolPort().isDone()) { bindPortFutures.getPoolPort().complete(selectedListenPort);
public static void main(String[] args) { mainInit(args); _logger = new BatfishLogger(_settings.getLogLevel(), false, _settings.getLogFile(), false, true); mainRun(new BindPortFutures()); }