您可以尝试使用Hive-Hbase integration,然后将map hbase table 数据转至hive table。
然后通过使用 Hive-Hbase 表,我们可以将 Hbase 表的完整转储创建到常规 Hive 表(orc、parquet..etc)。
Step-1:Create HBase-Hive Integrated table:
hive> CREATE EXTERNAL TABLE <db_name>.<hive_hbase_table_name> (key int, value string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")
TBLPROPERTIES ("hbase.table.name" = "<hbase_table_name>");
Step-2:Create Hive Dump of Hbase table:
hive> create table <db_name>.<table_name> stored as orc as
select * from <db_name>.<hive_hbase_table_name>;
Step-3: Exporting to CSV format:
hive> INSERT OVERWRITE DIRECTORY <hdfs_directory>
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
select * from <db_name>.<hive_hbase_table_name>;
有关导出 hive 表的更多详细信息/选项,请参阅 this 链接。