Wednesday 30 October 2013

HBase

list -  to list the tables

if needed add
<property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2182</value>
</property>


in zoo.cfg change to 2182

in hbase-env.sh uncomment

#HBASE_MANAGES_ZK = true

try restarting the processes



Run from terminal to count the no of distinct rows in a hbase table

echo "scan 'table'" | hbase shell | grep "columnFamliyName:" | wc -l

Divide the count by the no of columns and you will  get the no of distinct rows