Examples of parseProperties()


Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

    System.setProperty("hbase.master.hostname", "foo.bar");
    is = new ByteArrayInputStream(s.getBytes());
    properties = ZKConfig.parseZooCfg(conf, is);
    assertEquals("foo.bar:2888:3888", properties.get("server.0"));

    config.parseProperties(properties);

    servers = config.getServers();
    server = servers.get(Long.valueOf(0));
    assertEquals("foo.bar", server.addr.getHostName());
  }
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

      Integer.valueOf(properties.getProperty("clientPort")));
    assertEquals("localhost:2888:3888", properties.get("server.0"));

    HQuorumPeer.writeMyID(properties);
    QuorumPeerConfig config = new QuorumPeerConfig();
    config.parseProperties(properties);

    assertEquals(this.dataDir.toString(), config.getDataDir());
    assertEquals(2181, config.getClientPortAddress().getPort());
    Map<Long,QuorumServer> servers = config.getServers();
    assertEquals(3, servers.size());
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

    System.setProperty("hbase.master.hostname", "foo.bar");
    is = new ByteArrayInputStream(s.getBytes());
    properties = ZKConfig.parseZooCfg(conf, is);
    assertEquals("foo.bar:2888:3888", properties.get("server.0"));

    config.parseProperties(properties);

    servers = config.getServers();
    server = servers.get(Long.valueOf(0));
    assertEquals("foo.bar", server.addr.getHostName());
  }
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

      QuorumPeerConfig qpc = new QuorumPeerConfig();
      Properties p = new Properties();
      p.setProperty("tickTime", _tickTime);
      p.setProperty("clientPort", String.valueOf(_clientPort));
      p.setProperty("dataDir", _dataDir);
      qpc.parseProperties(p);

      ServerConfig serverConfig = new ServerConfig();
      serverConfig.readFrom(qpc);

      runFromConfig(serverConfig);
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("starting zookeeper server on {}:{}",
          p.get("clientPortAddress"), p.get("clientPort"));
    }
    QuorumPeerConfig qpc = new QuorumPeerConfig();
    qpc.parseProperties(p);
    config = new ServerConfig();
    config.readFrom(qpc);
    zkThread = new Thread(this);
    zkThread.start();
  }
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

      Integer.valueOf(properties.getProperty("clientPort")));
    assertEquals("localhost:2888:3888", properties.get("server.0"));

    HQuorumPeer.writeMyID(properties);
    QuorumPeerConfig config = new QuorumPeerConfig();
    config.parseProperties(properties);

    assertEquals(this.dataDir.toString(), config.getDataDir());
    assertEquals(2181, config.getClientPortAddress().getPort());
    Map<Long,QuorumServer> servers = config.getServers();
    assertEquals(3, servers.size());
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

    System.setProperty("hbase.master.hostname", "foo.bar");
    is = new ByteArrayInputStream(s.getBytes());
    properties = ZKConfig.parseZooCfg(conf, is);
    assertEquals("foo.bar:2888:3888", properties.get("server.0"));

    config.parseProperties(properties);

    servers = config.getServers();
    server = servers.get(Long.valueOf(0));
    assertEquals("foo.bar", server.addr.getHostName());
  }
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

      public void run() {
        try {
          // Configure a local zookeeper instance
          Properties zkProperties = generateLocalZkProperties();
          QuorumPeerConfig qpConfig = new QuorumPeerConfig();
          qpConfig.parseProperties(zkProperties);
          // run the zookeeper instance
          final ServerConfig zkConfig = new ServerConfig();
          zkConfig.readFrom(qpConfig);
          zookeeper.runFromConfig(zkConfig);
        } catch (QuorumPeerConfig.ConfigException qpcce) {
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

    // Configure a local zookeeper instance
    Properties zkProperties = configLocalZooKeeper(zkDir, localZookeeperPort);

    QuorumPeerConfig qpConfig = new QuorumPeerConfig();
    qpConfig.parseProperties(zkProperties);

    boolean success = runZooKeeperAndJob(qpConfig, job);
    if (!success) {
      return null;
    }
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties()

    // Configure a local zookeeper instance
    Properties zkProperties = configLocalZooKeeper(zkDir, localZookeeperPort);

    QuorumPeerConfig qpConfig = new QuorumPeerConfig();
    qpConfig.parseProperties(zkProperties);

    runZooKeeperAndJob(qpConfig, job);

  }
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.