Examples of MiniZooKeeperCluster


Examples of org.apache.drill.exec.util.MiniZooKeeperCluster

    }
  }

  public void startZookeeper(int numServers) {
    try {
      this.zkCluster = new MiniZooKeeperCluster();
      zkCluster.setDefaultClientPort(Integer.parseInt(this.zkUrl.split(":")[1]));
      zkCluster.startup(testDir, numServers);
    } catch (IOException e) {
      propagate(e);
    } catch (InterruptedException e) {
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

  /**
   * Actually start the MiniHBase instance.
   */
  protected static void hBaseClusterSetup() throws Exception {
    zooKeeperCluster = new MiniZooKeeperCluster();
    int clientPort = zooKeeperCluster.startup(new File("build/test"));
    conf.set("hbase.zookeeper.property.clientPort", clientPort + "");
    // start the mini cluster
    hbaseCluster = new MiniHBaseCluster(conf, NUM_REGIONSERVERS);
    // opening the META table ensures that cluster is running
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

    public void preTest(HiveConf conf) throws Exception {

      if (zooKeeperCluster == null) {
        String tmpdir =  System.getProperty("user.dir")+"/../build/ql/tmp";
        zooKeeperCluster = new MiniZooKeeperCluster();
        zkPort = zooKeeperCluster.startup(new File(tmpdir, "zookeeper"));
      }

      if (zooKeeper != null) {
        zooKeeper.close();
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

  private void setUpFixtures(HiveConf conf) throws Exception {
    conf.set("hbase.master", "local");
    String tmpdir =  System.getProperty("user.dir")+"/../build/ql/tmp";
    hbaseRoot = "file://" + tmpdir + "/hbase";
    conf.set("hbase.rootdir", hbaseRoot);
    zooKeeperCluster = new MiniZooKeeperCluster();
    zooKeeperPort = zooKeeperCluster.startup(
      new File(tmpdir, "zookeeper"));
    conf.set("hbase.zookeeper.property.clientPort",
      Integer.toString(zooKeeperPort));
    HBaseConfiguration hbaseConf = new HBaseConfiguration(conf);
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

   
    /**
     * Actually start the MiniHBase instance.
     */
    protected void hBaseClusterSetup() throws Exception {
        zooKeeperCluster = new MiniZooKeeperCluster();
        int clientPort = this.zooKeeperCluster.startup(new File("build/test"));
        conf.set("hbase.zookeeper.property.clientPort",clientPort+"");
      // start the mini cluster
      hbaseCluster = new MiniHBaseCluster(conf, NUM_REGIONSERVERS);
      // opening the META table ensures that cluster is running
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

  private static void startZooKeeper() throws Exception {
    if (zooKeeperCluster != null) {
      LOG.error("ZooKeeper already running");
      return;
    }
    zooKeeperCluster = new MiniZooKeeperCluster();
    zooKeeperCluster.startup(testDir);
    LOG.info("started " + zooKeeperCluster.getClass().getName());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

            LOG.info("vmInputArguments=" + runtime.getInputArguments());
          }
          // If 'local', defer to LocalHBaseCluster instance.  Starts master
          // and regionserver both in the one JVM.
          if (LocalHBaseCluster.isLocal(conf)) {
            final MiniZooKeeperCluster zooKeeperCluster =
              new MiniZooKeeperCluster();
            File zkDataPath = new File(conf.get("hbase.zookeeper.property.dataDir"));
            int zkClientPort = conf.getInt("hbase.zookeeper.property.clientPort", 0);
            if (zkClientPort == 0) {
              throw new IOException("No config value for hbase.zookeeper.property.clientPort");
            }
            zooKeeperCluster.setTickTime(conf.getInt("hbase.zookeeper.property.tickTime", 3000));
            zooKeeperCluster.setClientPort(zkClientPort);
            int clientPort = zooKeeperCluster.startup(zkDataPath);
            if (clientPort != zkClientPort) {
              String errorMsg = "Couldnt start ZK at requested address of " +
                  zkClientPort + ", instead got: " + clientPort + ". Aborting. Why? " +
                  "Because clients (eg shell) wont be able to find this ZK quorum";
              System.err.println(errorMsg);
View Full Code Here

Examples of org.apache.hadoop.hbase.MiniZooKeeperCluster

  private static void startZooKeeper() throws Exception {
    if (zooKeeperCluster != null) {
      LOG.error("ZooKeeper already running");
      return;
    }
    zooKeeperCluster = new MiniZooKeeperCluster();
    zooKeeperCluster.startup(testDir);
    LOG.info("started " + zooKeeperCluster.getClass().getName());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster

  throws Exception {
    if (this.zkCluster != null) {
      throw new IOException("Cluster already running at " + dir);
    }
    this.passedZkCluster = false;
    this.zkCluster = new MiniZooKeeperCluster(this.getConfiguration());
    int clientPort =   this.zkCluster.startup(dir,zooKeeperServerNum);
    this.conf.set(HConstants.ZOOKEEPER_CLIENT_PORT,
      Integer.toString(clientPort));
    return this.zkCluster;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster

    hbaseConf.set(HConstants.ZOOKEEPER_QUORUM, "0.0.0.0");
    hbaseConf.setInt("hbase.master.info.port", -1);
    hbaseConf.setInt("hbase.zookeeper.property.maxClientCnxns",500);
    String zookeeperDir = new File(workDir,"zk").getAbsolutePath();
    int zookeeperPort = 2181;
    zookeeperCluster = new MiniZooKeeperCluster();
    Method m;
    Class<?> zkParam[] = {Integer.TYPE};
    try{
      m = MiniZooKeeperCluster.class.getDeclaredMethod("setDefaultClientPort",
          zkParam);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.