Source:
public AmbryCoordinator(VerifiableProperties properties, ClusterMap clusterMap, NotificationSystem notificationSystem) { this.shuttingDown = new AtomicBoolean(false); this.clusterMap = clusterMap; this.responseFailureHandler = new ResponseFailureHandler(clusterMap); this.coordinatorMetrics = new CoordinatorMetrics(clusterMap); this.notificationSystem = notificationSystem; this.randomForPartitionSelection = new Random(); logger.info("coordinator starting"); try { logger.info("Setting up JMX."); MetricRegistry registry = clusterMap.getMetricRegistry(); this.reporter = JmxReporter.forRegistry(registry).build(); reporter.start(); logger.info("Creating configs"); CoordinatorConfig coordinatorConfig = new CoordinatorConfig(properties); ConnectionPoolConfig connectionPoolConfig = new ConnectionPoolConfig(properties); properties.verify(); this.connectionPoolCheckoutTimeout = coordinatorConfig.connectionPoolCheckoutTimeoutMs; this.clientId = coordinatorConfig.hostname; this.crossDCProxyCallsEnabled = coordinatorConfig.crossDCProxyCallEnable; this.datacenterName = coordinatorConfig.datacenterName; if (!clusterMap.hasDatacenter(datacenterName)) { throw new IllegalStateException("Datacenter with name " + datacenterName + " is not part of cluster map. " + "Coordinator cannot start."); } this.operationTimeoutMs = coordinatorConfig.operationTimeoutMs; this.nodeTimeoutMs = coordinatorConfig.nodeTimeoutMs; logger.info("Creating requester pool"); this.requesterPool = Executors.newFixedThreadPool(coordinatorConfig.requesterPoolSize); logger.info("Getting connection pool"); ConnectionPoolFactory connectionPoolFactory = Utils.getObj(coordinatorConfig.connectionPoolFactory, connectionPoolConfig, registry); this.connectionPool = connectionPoolFactory.getConnectionPool(); connectionPool.start(); logger.info("coordinator started"); } catch (Exception e) { logger.error("Error during start {}", e); throw new InstantiationError("Error during start " + e); } }

Target:
public AmbryCoordinator(VerifiableProperties properties, ClusterMap clusterMap, NotificationSystem notificationSystem) { this.shuttingDown = new AtomicBoolean(false); this.clusterMap = clusterMap; this.responseFailureHandler = new ResponseFailureHandler(clusterMap); this.coordinatorMetrics = new CoordinatorMetrics(clusterMap); this.notificationSystem = notificationSystem; this.randomForPartitionSelection = new Random(); logger.info("coordinator starting"); try { logger.info("Setting up JMX."); MetricRegistry registry = clusterMap.getMetricRegistry(); this.reporter = JmxReporter.forRegistry(registry).build(); reporter.start(); logger.info("Creating configs"); CoordinatorConfig coordinatorConfig = new CoordinatorConfig(properties); ConnectionPoolConfig connectionPoolConfig = new ConnectionPoolConfig(properties); properties.verify(); this.connectionPoolCheckoutTimeout = coordinatorConfig.connectionPoolCheckoutTimeoutMs; this.clientId = coordinatorConfig.hostname; this.crossDCProxyCallsEnabled = coordinatorConfig.crossDCProxyCallEnable; this.datacenterName = coordinatorConfig.datacenterName; if (!clusterMap.hasDatacenter(datacenterName)) { throw new IllegalStateException("Datacenter with name " + datacenterName + " is not part of cluster map. " + "Coordinator cannot start."); } this.operationTimeoutMs = coordinatorConfig.operationTimeoutMs; logger.info("Creating requester pool"); this.requesterPool = Executors.newFixedThreadPool(coordinatorConfig.requesterPoolSize); logger.info("Getting connection pool"); ConnectionPoolFactory connectionPoolFactory = Utils.getObj(coordinatorConfig.connectionPoolFactory, connectionPoolConfig, registry); this.connectionPool = connectionPoolFactory.getConnectionPool(); connectionPool.start(); logger.info("coordinator started"); } catch (Exception e) { logger.error("Error during start {}", e); throw new InstantiationError("Error during start " + e); } }