1
votes

I am new to HBase and I am learning it on my own. I install HBase and tried to create a table using the following command

hbase(main):008:0> create 'htest', 'cf'

but I am thrown a ton of error. This is what comes up:

2016-05-27 02:51:12,835 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 2016-05-27 02:51:13,038 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 2016-05-27 02:51:13,339 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 2016-05-27 02:51:13,843 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 2016-05-27 02:51:14,848 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 2016-05-27 02:51:16,852 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 2016-05-27 02:51:20,873 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

ERROR: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

Here is some help for this command: Creates a table. Pass a table name, and a set of column family specifications (at least one), and, optionally, table configuration. Column specification can be a simple string (name), or a dictionary (dictionaries are described below in main help output), necessarily including NAME attribute. Examples:

Create a table with namespace=ns1 and table qualifier=t1 hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}

Create a table with namespace=default and table qualifier=t1 hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'} hbase> # The above in shorthand would be the following: hbase> create 't1', 'f1', 'f2', 'f3' hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true} hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}

Table configuration options can be put at the end. Examples:

hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40'] hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40'] hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe' hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' } hbase> # Optionally pre-split the table into NUMREGIONS, using hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname) hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'} hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', REGION_REPLICATION => 2, CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}

You can also keep around a reference to the created table:

hbase> t1 = create 't1', 'f1'

Which gives you a reference to the table named 't1', on which you can then call methods.

I have no idea what to do! Any help is appreciated!

Also, should I have had configured Zookeeper before I installed HBase? My tutorial didn't say so.

1
Also, when I list, another error throws up. Please help! - Anonymous Person
Any solution yet ? Facing the same problem. - Sarang Manjrekar
Lol, nope. No one seems to care. I've since removed Ubuntu and installed Mint and got the same bloody error. - Anonymous Person
@AnonymousPerson, I had a similar issue connecting to Hbase remotely from my java code. Below is what helped me fix the problem. First, on your cluster (or linux node) type command "zookeeper-client" and then "ls /". Check if "hbase" directory is created (Ctr + D to exit from zookeeper-client). If not set the property of "zookeeper.znode.parent" to "/hbase-unsecure". This worked for me. I can share my java test code if it helps - AnswerSeeker
@Rag, Thanks for that. Let me give that a shot. Btw, I'm not doing it using Java. Its just the regular (hbase) shell. - Anonymous Person

1 Answers

0
votes

Need to check the HBase log for the errors, most commonly the solution is setting correct parameters in the HBase-env.sh file.

Please refer to the link below. Its working for me perfectly.

https://sarangmanjrekar.wordpress.com/2016/10/06/node-hbase-is-not-in-zookeeper/