1
votes

I just started with hbase. Therefore I created a table and filled this table with some data. But after restarting my computer all the data has gone. This even happens when stopping hbase with stop-hbase.sh. hbase installation : pseudo distributed hbase-site.xml :

hbase.rootdir hdfs://localhost:9000/hbase

1
hbase installation : pseudo distributed hbase-site.xml : <name>hbase.rootdir</name> <value>hdfs://localhost:9000/hbase</value>aymen

1 Answers

1
votes

By default, hbase.rootdir is set to /tmp/hbase-${user.name}, which could mean you lose all your data whenever your server or test machine reboots because a lot of operating systems (OSes) clear out /tmp during a restart.

Source: Hbase the definitive guide - 2 nd edition.

If you are saving your hbase files in local dir, then add below properties in your hbase-site.xml.

    <property>
      <name>hbase.rootdir</name>
      <value>file:///<PATH>/hbase</value>
    </property>
    <property>
      <name>hbase.zookeeper.property.dataDir</name>
      <value>file:///<PATH>/zookeeper</value>
    </property>