Source:
<code>public void startup() throws InstantiationException { try { logger.info("starting"); logger.info("Setting up JVM metrics."); jvmMetrics.start(); logger.info("creating configs"); NetworkConfig networkConfig = new NetworkConfig(properties); StoreConfig storeConfig = new StoreConfig(properties); MetricsConfig metricsConfig = new MetricsConfig(properties); properties.verify(); logger.info("Setting up metrics reporters."); List<String> reporterFactoryNames = metricsConfig.getMetricsReporterFactoryClassNames(); try { for (String factoryClass : reporterFactoryNames) { MetricsReporterFactory factory = Utils.getObj(factoryClass); MetricsReporter reporter = factory.getMetricsReporter(factoryClass, "Blob Node", metricsConfig); reporters.put(factoryClass, reporter); } logger.info("Got metrics reporters: {}", reporters.keySet()); } catch (Exception e) { logger.error("Error while creating reporters. Logging and proceeding " + e); } scheduler.startup(); logger.info("check if node exist in clustermap host port {}", networkConfig.hostName, networkConfig.port); DataNodeId nodeId = clusterMap.getDataNodeId(networkConfig.hostName, networkConfig.port); if (nodeId == null) throw new IllegalArgumentException("The node is not present in the clustermap. Failing to start the datanode"); StoreKeyFactory factory = Utils.getObj(storeConfig.storeKeyFactory, clusterMap); networkServer = new SocketServer(networkConfig); networkServer.start(); storeManager = new StoreManager(storeConfig, scheduler, registryMap, clusterMap.getReplicaIds(nodeId), factory, new BlobRecovery()); storeManager.start(); requests = new AmbryRequests(storeManager, networkServer.getRequestResponseChannel(), clusterMap, nodeId); <START> requestHandlerPool = new RequestHandlerPool(7, networkServer.getRequestResponseChannel(), requests); <END> logger.info("Starting all the metrics reporters"); for (Map.Entry<String, MetricsReporter> reporterEntry : reporters.entrySet()) { reporterEntry.getValue().register("data node", registryMap); reporterEntry.getValue().start(); } logger.info("started"); } catch (Exception e) { logger.error("Error during startup {}", e); throw new InstantiationException("failure during startup " + e); } }</code><technical_language>7 is a magic number. in config file of some sort</technical_language>

Target:
public void startup() throws InstantiationException { try { logger.info("starting"); logger.info("Setting up JVM metrics."); jvmMetrics.start(); logger.info("creating configs"); NetworkConfig networkConfig = new NetworkConfig(properties); StoreConfig storeConfig = new StoreConfig(properties); MetricsConfig metricsConfig = new MetricsConfig(properties); ServerConfig serverConfig = new ServerConfig(properties); properties.verify(); logger.info("Setting up metrics reporters."); List<String> reporterFactoryNames = metricsConfig.getMetricsReporterFactoryClassNames(); try { for (String factoryClass : reporterFactoryNames) { MetricsReporterFactory factory = Utils.getObj(factoryClass); MetricsReporter reporter = factory.getMetricsReporter(factoryClass, "Blob Node", metricsConfig); reporters.put(factoryClass, reporter); } logger.info("Got metrics reporters: {}", reporters.keySet()); } catch (Exception e) { logger.error("Error while creating reporters. Logging and proceeding " + e); } scheduler.startup(); logger.info("check if node exist in clustermap host port {}", networkConfig.hostName, networkConfig.port); DataNodeId nodeId = clusterMap.getDataNodeId(networkConfig.hostName, networkConfig.port); if (nodeId == null) throw new IllegalArgumentException("The node is not present in the clustermap. Failing to start the datanode"); StoreKeyFactory factory = Utils.getObj(storeConfig.storeKeyFactory, clusterMap); networkServer = new SocketServer(networkConfig); networkServer.start(); storeManager = new StoreManager(storeConfig, scheduler, registryMap, clusterMap.getReplicaIds(nodeId), factory, new BlobStoreRecovery()); storeManager.start(); requests = new AmbryRequests(storeManager, networkServer.getRequestResponseChannel(), clusterMap, nodeId); requestHandlerPool = new RequestHandlerPool(serverConfig.serverRequestHandlerNumOfThreads, networkServer.getRequestResponseChannel(), requests); logger.info("Starting all the metrics reporters"); for (Map.Entry<String, MetricsReporter> reporterEntry : reporters.entrySet()) { reporterEntry.getValue().register("data node", registryMap); reporterEntry.getValue().start(); } logger.info("started"); } catch (Exception e) { logger.error("Error during startup {}", e); throw new InstantiationException("failure during startup " + e); } }