hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Change Zookeeper clientPort from HbaseTestingUtility
Date Thu, 24 Sep 2015 15:43:06 GMT
Please see the following in HBaseTestingUtility.java :

   * Start a mini ZK cluster. If the property
"test.hbase.zookeeper.property.clientPort" is set
   *  the port mentionned is used as the default port for ZooKeeper.
   */
  private MiniZooKeeperCluster startMiniZKCluster(final File dir,
      int zooKeeperServerNum)

Cheers

On Wed, Sep 23, 2015 at 11:49 PM, Tuan Le Dinh <ldtuanbk@gmail.com> wrote:

> Hi hbase members,
>
> I am using HbaseTestingUtility version 0.98.14-hadoop2 for integration
> test.
> I want Zookeeper to listen on a fixed port 2181.
> However, using the code snippets below, Zookeeper uses a random port
> everytime it runs.
>
> HBaseTestingUtility testUtil = new HBaseTestingUtility();
> testUtil.getConfiguration().set("hbase.zookeeper.property.clientPort",
> "2181");
> MiniHBaseCluster cluster = testUtil.startMiniCluster();
>
> LOG: Started MiniZK Cluster and connect 1 ZK server on client port: 64914
>
> What am I doing wrong here? Please help me to figure it out.
>
> Thank you.
> Tuan Le
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message