@Override public void start() { try { env = new Environment(config); reporters = ReporterUtil.setupReporters(env); appIdCache = CuratorUtil.startAppIdWatcher(env); log.info("Starting Oracle for Fluo '{}' application with the following configuration:", config.getApplicationName()); env.getConfiguration().print(); oracleServer = new OracleServer(env); oracleServer.start(); } catch (Exception e) { throw new FluoException(e); } }
@Override public void start() { try { env = new Environment(config); reporters = ReporterUtil.setupReporters(env); appIdCache = CuratorUtil.startAppIdWatcher(env); log.info("Starting Oracle for Fluo '{}' application with the following configuration:", config.getApplicationName()); env.getConfiguration().print(); oracleServer = new OracleServer(env); oracleServer.start(); } catch (Exception e) { throw new FluoException(e); } }
public MiniFluoImpl(FluoConfiguration fluoConfig) { if (!fluoConfig.hasRequiredMiniFluoProps()) { throw new IllegalArgumentException("MiniFluo configuration is not valid"); } config = fluoConfig; try { if (config.getMiniStartAccumulo()) { startMiniAccumulo(); } config.setProperty(FluoConfigurationImpl.NTFY_FINDER_MIN_SLEEP_TIME_PROP, 50); config.setProperty(FluoConfigurationImpl.NTFY_FINDER_MAX_SLEEP_TIME_PROP, 100); env = new Environment(config); reporter = FluoClientImpl.setupReporters(env, "mini", reporterCounter); oserver = new OracleServer(env); oserver.start(); mnp = new NotificationProcessor(env); notificationFinder = NotificationFinderFactory.newNotificationFinder(env.getConfiguration()); notificationFinder.init(env, mnp); notificationFinder.start(); } catch (Exception e) { throw new RuntimeException(e); } }
public MiniFluoImpl(FluoConfiguration fluoConfig) { if (!fluoConfig.hasRequiredMiniFluoProps()) { throw new IllegalArgumentException("MiniFluo configuration is not valid"); } config = fluoConfig; try { if (config.getMiniStartAccumulo()) { startMiniAccumulo(); } config.setProperty(FluoConfigurationImpl.NTFY_FINDER_MIN_SLEEP_TIME_PROP, 50); config.setProperty(FluoConfigurationImpl.NTFY_FINDER_MAX_SLEEP_TIME_PROP, 100); env = new Environment(config); reporter = FluoClientImpl.setupReporters(env, "mini", reporterCounter); oserver = new OracleServer(env); oserver.start(); mnp = new NotificationProcessor(env); notificationFinder = NotificationFinderFactory.newNotificationFinder(env.getConfiguration()); notificationFinder.init(env, mnp); notificationFinder.start(); } catch (Exception e) { throw new RuntimeException(e); } }
@Before public void setUpFluo() throws Exception { table = getNextTableName(); config = new FluoConfiguration(); config.setApplicationName("impl-test" + testCounter.getAndIncrement()); config.setAccumuloInstance(clientInfo.getInstanceName()); config.setAccumuloUser(USER); config.setAccumuloPassword(PASSWORD); config.setAccumuloTable(table); config.setAccumuloZookeepers(clientInfo.getZooKeepers()); config.setInstanceZookeepers(clientInfo.getZooKeepers() + "/fluo"); config.setTransactionRollbackTime(1, TimeUnit.SECONDS); setupObservers(config); config.setProperty(FluoConfigurationImpl.ZK_UPDATE_PERIOD_PROP, "1000"); config.setMiniStartAccumulo(false); try (FluoAdmin admin = FluoFactory.newAdmin(config)) { InitializationOptions opts = new InitializationOptions().setClearZookeeper(true).setClearTable(true); admin.initialize(opts); } client = FluoFactory.newClient(config); env = new Environment(config); oserver = new OracleServer(env); oserver.start(); }
OracleServer oserver2 = new OracleServer(env2); oserver2.start();