public static void createPath(final ZooKeeperItf zk, final String path) throws InterruptedException, KeeperException { createPath(zk, path, null); }
public static void createPath(final ZooKeeperItf zk, final String path) throws InterruptedException, KeeperException { createPath(zk, path, null); }
public IndexerProcessRegistryImpl(ZooKeeperItf zk, Configuration conf) throws InterruptedException, KeeperException { this.zk = zk; this.zkBaseNode = conf.get(ConfKeys.ZK_ROOT_NODE) + "/indexerprocess"; ZkUtil.createPath(zk, zkBaseNode); }
public IndexerProcessRegistryImpl(ZooKeeperItf zk, Configuration conf) throws InterruptedException, KeeperException { this.zk = zk; this.zkBaseNode = conf.get(ConfKeys.ZK_ROOT_NODE) + "/indexerprocess"; ZkUtil.createPath(zk, zkBaseNode); }
public IndexerModelImpl(ZooKeeperItf zk, String zkRoot) throws InterruptedException, KeeperException { this.zk = zk; this.indexerCollectionPath = zkRoot + "/indexer"; this.indexerCollectionPathSlash = indexerCollectionPath + "/"; this.indexerTrashPath = zkRoot + "/indexer-trash"; ZkUtil.createPath(zk, indexerCollectionPath); ZkUtil.createPath(zk, indexerTrashPath); zk.addDefaultWatcher(connectStateWatcher); indexerCacheRefresher.start(); indexerCacheRefresher.waitUntilStarted(); }
public IndexerModelImpl(ZooKeeperItf zk, String zkRoot) throws InterruptedException, KeeperException { this.zk = zk; this.indexerCollectionPath = zkRoot + "/indexer"; this.indexerCollectionPathSlash = indexerCollectionPath + "/"; this.indexerTrashPath = zkRoot + "/indexer-trash"; ZkUtil.createPath(zk, indexerCollectionPath); ZkUtil.createPath(zk, indexerTrashPath); zk.addDefaultWatcher(connectStateWatcher); indexerCacheRefresher.start(); indexerCacheRefresher.waitUntilStarted(); }
private JettySolrRunner createServer() throws Exception { // create path on zookeeper for solr cloud ZooKeeperItf zk = ZkUtil.connect("localhost:" + zkClientPort, 10000); ZkUtil.createPath(zk, "/solr"); zk.close(); return new JettySolrRunner(solrHomeDir.toString(), "/solr", solrPort); }
private JettySolrRunner createServer() throws Exception { // create path on zookeeper for solr cloud ZooKeeperItf zk = ZkUtil.connect("localhost:" + zkClientPort, 10000); ZkUtil.createPath(zk, "/solr"); zk.close(); return new JettySolrRunner(solrHomeDir.toString(), "/solr", solrPort); }
ZkUtil.createPath(zk, basePath + "/hbaseid", Bytes.toBytes(uuid.toString())); ZkUtil.createPath(zk, basePath + "/rs");
ZkUtil.createPath(zk, basePath + "/hbaseid", Bytes.toBytes(uuid.toString())); ZkUtil.createPath(zk, basePath + "/rs");
private void proposeAsLeader() throws LeaderElectionSetupException, InterruptedException, KeeperException { ZkUtil.createPath(zk, electionPath); try { // In case of connection loss, a node might have been created for us (we do not know it). Therefore, // retrying upon connection loss is important, so that we can continue with watching the leaders. // Later on, we do not look at the name of the node we created here, but at the owner. zk.retryOperation(new ZooKeeperOperation<String>() { @Override public String execute() throws KeeperException, InterruptedException { return zk.create(electionPath + "/n_", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL_SEQUENTIAL); } }); } catch (KeeperException e) { throw new LeaderElectionSetupException("Error creating leader election zookeeper node below " + electionPath, e); } watchLeaders(); }
private void proposeAsLeader() throws LeaderElectionSetupException, InterruptedException, KeeperException { ZkUtil.createPath(zk, electionPath); try { // In case of connection loss, a node might have been created for us (we do not know it). Therefore, // retrying upon connection loss is important, so that we can continue with watching the leaders. // Later on, we do not look at the name of the node we created here, but at the owner. zk.retryOperation(new ZooKeeperOperation<String>() { @Override public String execute() throws KeeperException, InterruptedException { return zk.create(electionPath + "/n_", null, CreateMode.EPHEMERAL_SEQUENTIAL); } }); } catch (KeeperException e) { throw new LeaderElectionSetupException("Error creating leader election zookeeper node below " + electionPath, e); } watchLeaders(); }