AnsweredAssumed Answered

[Error]Check the value configured in 'zookeeper.znode.parent' while trying to connect to Hbase table/M7 table

Question asked by SanjeevSukumaran on Jun 24, 2016
Latest reply on Jul 28, 2016 by Rachel Silver


Hello,

 

I ran the following java program from eclipse.

import org.apache.hadoop.conf.Configuration;

import org.apache.hadoop.hbase.HBaseConfiguration;

import org.apache.hadoop.hbase.client.HTable;

import org.apache.hadoop.hbase.client.Put;

import java.io.IOException;

 

 

public class M7Demo {

 

 

  public static void main(String[] args) throws IOException {

  Configuration conf = HBaseConfiguration.create();

 

   conf.set("hbase.zookeeper.quorum","chu4l5ap69:5181,chu4l5ap67:5181,chu4l5ap68:5181");

  conf.set("hbase.zookeeper.property.clientPort","5181");

  conf.set("hbase.rootdir","maprfs:///hbase");

  conf.set("hbase.cluster.distributed","true");

  conf.set("dfs.support.append","true");

  conf.set("hbase.fsutil.maprfs.impl","org.apache.hadoop.hbase.util.FSMapRUtils");

  conf.set("hbase.regionserver.handler.count","30");

  conf.set("fs.mapr.threads","64");

   // conf.set("zookeeper.znode.parent","/hbase-unsecure");

  String tableName = "demo1";

    HTable table = new HTable(conf,tableName);

 

 

  Put p1 = new Put("student1".getBytes());

 

  byte[] account = "account".getBytes();

  byte[] address = "address".getBytes();

 

  p1.add(account,"name".getBytes(),"Alice".getBytes());

  p1.add(address,"street".getBytes(),"123 Ballmer Av".getBytes());

  p1.add(address,"zipcode".getBytes(),"12345".getBytes());

  p1.add(address,"state".getBytes(),"CA".getBytes());

 

  Put p2 = new Put("student2".getBytes());

  p2.add(account,"name".getBytes(),"Bob".getBytes());

  p2.add(address,"street".getBytes(),"1 Infinite Loop".getBytes());

  p2.add(address,"zipcode".getBytes(),"12345".getBytes());

  p2.add(address,"state".getBytes(),"CA".getBytes());

 

  table.put(p1);

  table.put(p2);

  table.close();

 

    }

  }

 

2016-06-24 15:01:15,845 ERROR [main] zookeeper.ZooKeeperNodeTracker: Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

2016-06-24 15:01:15,845 ERROR [main] zookeeper.ZooKeeperNodeTracker: Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

Exception in thread "main" java.lang.IllegalArgumentException: Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

  at org.apache.hadoop.hbase.zookeeper.RootRegionTracker.waitRootRegionLocation(RootRegionTracker.java:81)

  at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:987)

  at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1100)

  at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:998)

  at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1100)

  at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1002)

  at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:959)

  at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:279)

  at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:169)

  at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:139)

  at M7Demo.main(M7Demo.java:22)

 

 

Kindly help me with the same.

 

Thanks and Regards

Sanjeev Sukumaran

Outcomes