Hbase memstore manual flush
hadoop, hbase, hdfs
Solution
From the shell you can just do `flush 'tableName'` to flush the memstore.
But if you want to do a backup of `/hbase/table` folder via hdfs, the way to do that is:
- disable the table: (from the shell: disable 'tableName')
- copy files: hadoop fs -cp /hbase/tableName /hbase-backup/tableName
- enable the table: (from the shell: enable 'tableName')
...or you can use the `CopyTable` or `Export` tools (http://hbase.apache.org/book/ops.backup.html)
Problem
According to Hbase design, Hbase uses memstore to store the writes and eventually when the memstore reaches the size limit, it flushes it to HDFS. This flushing exercise is happened automatically behind the theme. In my case, I want to do a hdfs migration, migrate from one cluster to another, I need to make sure there is nothing left in-memory before I bring down hbase process in the source cluster. Is there anyway we can manually force the flush even tho the memstore hasn't reached the limit. ==question added== further question: how do you know the flush is completed? via metrics?