I need to take a dump of one table in HBase and need it in a text file/csv format? I looked for scan
, export
and get
commands in HBase shell, but it doesn't work.
相关问题
- Joining two ResultSets from HBase in Java?
- Save CSV file to hbase table using Spark and Phoen
- hbase as database in web application
- thrift hbase client - support filters and coproces
- How to get the region in HBASE which is struck in
相关文章
- hbase-client 2.0.x error
- use protobuf3 with some lib which depends on proto
- Latest compatible version of hadoop and hbase
- Create table in hbase
- Connecting to remote HBase service using Java
- Connecting and Persisting to HBase
- How to configure hbase in spark?
- In Hadoop, where can i change default url ports 50
There are a lot of ways to get data out of an HBase table like running the export map/reduce job. You can read about this and other here http://blog.sematext.com/2011/03/11/hbase-backup-options/ If you want to control which rows/cells are written you can do that with pig scripts
If we need to have more control with Java code, hope below link will be helpful.
https://gist.github.com/sakthiinfotec/102fca54c91b411f626a
This will backup a single HBase table as CSV format in local filesystem. We need to pre-define the list of columns we needed from a single column family. This code uses necessary jars to connect HBase table along with OpenCSV jar to write CSV records.
Assumption here is all the columns are only string.