为 HDFS 目录中的文件创建 HBase table

Creating HBase table for files in HDFS directory

我正在尝试将 HDFS 目录中的所有文件数据加载到 HBase 中 table.Can 请分享我如何将所有文件数据和增量数据加载到 HBase table。 我将 HBase table 创建为

hbase>create 'sample','cf'

我要复制

hdfs://ip:port/user/test

进入示例 hbase table.please 建议我任何解决方案。

答案一:(可能)

ImportTSV,如果您尝试仅提供 /user/hadoop/ 目录路径而不是完整的文件路径,它应该处理该目录中的所有文件。

答案2:(好像不行)

The special column name HBASE_ROW_KEY is used to designate that this column should be used as the row key for each imported record. You must specify exactly one column to be the row key, and you must specify a column name for every column that exists in the input data.