简体   繁体   English

使用本机FS时的HBase批量加载

[英]HBase bulk load when using native FS

I have a big list of HBase sql statements that I need to run against an existing instance of HBase database. 我有一堆需要针对现有HBase数据库实例运行的HBase sql语句。

The SQL statements are in plain text, and the database is running on native file system (instead of HDFS). SQL语句为纯文本格式,并且数据库在本机文件系统(而不是HDFS)上运行。 Thus, I do not have a Hadoop instance running. 因此,我没有运行Hadoop实例。

I am currently running those SQL statements on an hbase shell, but the process is really slow. 我目前正在hbase shell上运行这些SQL语句,但是过程确实很慢。 I know if Hadoop is running, I can assign mappers to do parallel inserts, but is there a faster way to do bulk load without using a Hadoop instance? 我知道Hadoop是否正在运行,我可以分配映射器进行并行插入,但是有没有一种更快的方式来执行批量加载而不使用Hadoop实例?

Since Hadoop (More specifically MR) is designed for faster processing of Bulk Data (Big data), it is apt for your requirement. 由于Hadoop(更具体地说是MR)是为更快地处理批量数据(大数据)而设计的,因此它很适合您的要求。

Create StoreFiles on HDFS and then use use CompleteBulkLoad methods, to load data from StoreFile to table. 在HDFS上创建StoreFiles,然后使用使用CompleteBulkLoad方法将数据从StoreFile加载到表中。

Any specific reason for not using Hadoop Instance ? 不使用Hadoop实例的任何特定原因?

HBase provides ImportTSV API for bulk upload HBase提供了ImportTSV API进行批量上传

Here is an example of ImportTSv API 这是ImportTSv API的示例

http://souravgulati.webs.com/apps/forums/topics/show/8617965-hbase-bulk-upload-using-importtsv-in-hbase-table http://souravgulati.webs.com/apps/forums/topics/show/8617965-hbase-bulk-upload-using-importtsv-in-hbase-table

Here I tried uploading data from hdfs . 在这里,我尝试从hdfs上传数据。 You can try uploading data using ImportTSV from you local filesystem. 您可以尝试使用ImportTSV从本地文件系统上载数据。 If does not work then , run Hbase on top of HDFS 如果不起作用,请在HDFS上运行Hbase

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM