简体   繁体   中英

how to store hbase tables permanently on VM

I am doing some simple stuff in HBASE on VM by using bulk load . Would like to how how to persist the tables permanently in HBASE. If i restart the VM tables are gone so, do we have any command to store it permanently .

If you start HBase in local mode (ie, using the file system and not HDFS), then all of the data is by default saved in /tmp. Some linux systems will wipe /tmp on reboot (ie turning the VM on and off).

There are three ways of dealing with this

  1. use HDFS to store your data
  2. change your hbase-site.xml file to point to a location other than /tmp for your data
  3. never, ever, shutdown your VM (seriously, don't do this)

The correct property to set, quoting from the HBase book :

<property>
<name>hbase.rootdir</name>
<value>file:///DIRECTORY/hbase</value>
 </property>

where DIRECTORY is replaced with whereever you want to store data

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM