public void start() { zkClient.startAndWait(); txService.startAndWait(); }
public void start() { zkClient.startAndWait(); txService.startAndWait(); }
private void startUp() throws Exception { zkClientService.startAndWait(); txService.startAndWait(); }
public void start() { zkClient.startAndWait(); txService.startAndWait(); }
/** * Do the start up work * Note: includeNewDatasets boolean is required because upgrade tool has two mode: 1. Normal CDAP upgrade and * 2. Upgrading co processor for tables after hbase upgrade. This parameter specifies whether new system dataset * which were added in the current release needs to be added in the dataset framework or not. * During Normal CDAP upgrade (1) we don't need these datasets to be added in the ds framework as they will get * created during upgrade rather than when cdap starts after upgrade which is what we want. * Whereas during Hbase upgrade (2) we want these new tables to be added so that the co processor of these tables * can be upgraded when the user runs CDAP's Hbase Upgrade after upgrading to a newer version of Hbase. * @param includeNewDatasets boolean which specifies whether to add new datasets in ds framework or not */ private void startUp(boolean includeNewDatasets) throws Exception { // Start all the services. LOG.info("Starting Zookeeper Client..."); Services.startAndWait(zkClientService, cConf.getLong(Constants.Zookeeper.CLIENT_STARTUP_TIMEOUT_MILLIS), TimeUnit.MILLISECONDS, String.format("Connection timed out while trying to start ZooKeeper client. Please " + "verify that the ZooKeeper quorum settings are correct in cdap-site.xml. " + "Currently configured as: %s", cConf.get(Constants.Zookeeper.QUORUM))); LOG.info("Starting Transaction Service..."); txService.startAndWait(); LOG.info("Initializing Dataset Framework..."); initializeDSFramework(cConf, dsFramework, includeNewDatasets); LOG.info("Building and uploading new HBase coprocessors..."); coprocessorManager.ensureCoprocessorExists(); }
/** * Invoked by jsvc to start the program. */ public void start() throws Exception { Injector injector = Guice.createInjector( new ConfigModule(conf), new ZKModule(), new DiscoveryModules().getDistributedModules(), new TransactionModules().getDistributedModules(), new TransactionClientModule() ); ZKClientService zkClientService = injector.getInstance(ZKClientService.class); zkClientService.startAndWait(); // start a tx server txService = injector.getInstance(TransactionService.class); try { LOG.info("Starting {}", getClass().getSimpleName()); txService.startAndWait(); } catch (Exception e) { System.err.println("Failed to start service: " + e.getMessage()); } }