Reputation: 10861
I was using HBase on the native file system and created a few tables. Now I configured HDFS and want HBase to use that instead. I started Namenode and Datanode, but am not able to find a setting where I can tell HBase to use HDFS.
I thought it might pick up HDFS upon a restart, so I did that (stop-hbase + start-hbase), but I am still able to see the table I created earlier on the native file system.
How can I tell HBase to use HDFS?
Upvotes: 1
Views: 1908
Reputation: 10650
In $HBASE_HOME/conf/hbase-site.xml hbase.rootdir
defines the filesystem/directory where HBase persists. See:
http://hbase.apache.org/book/config.files.html#hbase_default_configurations
I assume you want to configure HBase in pseudo-distributed mode. If so set the followings in hbase-site.xml
:
<configuration>
...
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
...
</configuration>
In this case HBase will use the /hbase directory in your HDFS.
Upvotes: 4