从文件中批量插入HBase

时间:2012-11-11 03:48:36

标签: sql database hadoop hbase

我试图在表中插入很多行(我的目标是插入十亿个虚拟行)。这就是我所做的:

  1. 我将与插入相对应的十亿条SQL行写入文件。
  2. ./hbase shell < insert.sql
  3. 前几次插入很好,但很快就会遇到此错误

    put 'test', 'row19115', 'cf:a', '19115'
    
    ERROR: java.lang.OutOfMemoryError: unable to create new native thread
    
    Here is some help for this command:
    Put a cell 'value' at specified table/row/column and optionally
    timestamp coordinates.  To put a cell value into table 't1' at
    row 'r1' under column 'c1' marked with the time 'ts1', do:
    
      hbase> put 't1', 'r1', 'c1', 'value', ts1
    
    • 如何修复此错误/有更好的方法吗?
    • 此外,还有其他方法可以进行插入而不是每次都将它们写入文件吗?

0 个答案:

没有答案