public void start() throws Exception { logger.info("Starting up Gondola..."); clock.start(); network.start(); storage.start(); for (Cluster c : clusters) { c.start(); } // Start local threads assert threads.size() == 0; threads.add(new RoleChangeNotifier()); threads.forEach(t -> t.start()); }
/** * Starts all threads and enables the Gondola instance. */ public void start() throws GondolaException { try { logger.info("------- Gondola start: {}, {}, pid={} -------", hostId, config.getAddressForHost(hostId), processId); if (!inited) { init(); } // Start subsystem threads clock.start(); network.start(); storage.start(); for (Shard s : shards) { s.start(); } // Start local threads threads.add(new RoleChangeNotifier()); threads.forEach(t -> t.start()); objectName = new ObjectName("com.yahoo.gondola." + hostId + ":type=Stats"); mbs.registerMBean(stats, objectName); } catch (Exception e) { throw new GondolaException(e); } }