user1471980
user1471980

Reputation: 10656

How do you configure hbase to write to file system?

I've installed hbase in a suse linux box.

hbase-site.xml file looks like this:

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///app/data.1/dashboard/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/app/data.1/dashboard/zookeeper</value>
  </property>
</configuration>

I need storage to write to /app/data.1 file system since it is over 50TB.

However, it looks like hbase storage is writing to /tmp file system as this:

649557 3175064 -rw-rw-rw-   1 root     root     3251261936 Jul 19 08:08 /tmp/hbase-root/hbase/data/default/tsdb/34b328ecf9098d06861b9842ca10d7e3/t/4323c5b3dd28493fba3599e27ddbd206
655564 417304 -rw-rw-rw-   1 root     root     427316817 Jul 20 08:04 /tmp/hbase-root/hbase/data/default/tsdb/34b328ecf9098d06861b9842ca10d7e3/t/7f3b54ea27d04039b8adc5f92e41ed0c
628643 1675904 -rw-rw-rw-   1 root     root     1716125292 Jul 15 18:47 /tmp/hbase-root/hbase/data/default/tsdb/28814ba9094996a3be4f88a645b560ec/t/10e137365436489395ddf744cfe441b3
650747 841752 -rw-rw-rw-   1 root     root     861951312 Jul 19 12:47 /tmp/hbase-root/hbase/data/default/tsdb/28814ba9094996a3be4f88a645b560ec/t/94eab0e6abeb4dd7b36fa6d9eef90848
654131 121528 -rw-rw-rw-   1 root     root     124440720 Jul 20 02:10 /tmp/hbase-root/hbase/data/default/tsdb/28814ba9094996a3be4f88a645b560ec/t/75528389dcfd40feba362bbc36c14b29
632433 2402052 -rw-rw-rw-   1 root     root     2459698089 Jul 16 10:20 /tmp/hbase-root/hbase/data/default/tsdb/cf3fac6c4a6145e2299069f67cd0b03e/t/e67c877375754e049931e099e0823d6b
645040 797620 -rw-rw-rw-   1 root     root     816758792 Jul 18 13:16 /tmp/hbase-root/hbase/data/default/tsdb/cf3fac6c4a6145e2299069f67cd0b03e/t/c65664a12ec941b7854c943c16de3564
652138 417132 -rw-rw-rw-   1 root     root     427139257 Jul 19 18:24 /tmp/hbase-root/hbase/data/default/tsdb/cf3fac6c4a6145e2299069f67cd0b03e/t/60cb18e4ad2a4141a1c7dc47fb33d6f8
655874 219052 -rw-rw-rw-   1 root     root     224305840 Jul 20 09:16 /tmp/hbase-root/hbase/data/default/tsdb/cf3fac6c4a6145e2299069f67cd0b03e/t/66fd6f1a1

how is this possible? How would I move my hbase data to /app/data.1 directory? Any ideas?

Upvotes: 0

Views: 1008

Answers (2)

Daniel B Gray
Daniel B Gray

Reputation: 21

http://hbase.apache.org/book.html#hbase_default_configurations

Actually states that hbase.rootdir is "The directory shared by region servers and into which HBase persists." Only if it is not set does it default to hbase.tmp.dir. Therefore I do not think hbase is picking up your hbase-site.xml file. I'm betting this is likely do to your HBASE_CONF_DIR being set incorrectly. Please ensure HBASE_CONF_DIR points to your HBASE_HOME/conf directory.

Upvotes: 1

Anil Gupta
Anil Gupta

Reputation: 1126

You need to set hbase.tmp.dir property.
hbase.rootdir property specifies the rootdir of HBase in Zookeeper.
Have a look at HBase documentation: http://hbase.apache.org/book.html#hbase_default_configurations

Upvotes: 0

Related Questions