hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xin Wang <and...@gmail.com>
Subject How to put() and get() when setAutoFlush(false)?
Date Mon, 22 Nov 2010 17:28:37 GMT
Hello everyone,

  I am a beginner to HBase. I want to load a data file of 2 million lines
into a HBase table.
  I want to load data as fast as possible, so I called
HTable.setAutoFlush(false) at the beginning. However, when I HTable.put() a
row and then HTable.get() the same row, the result is empty. I know this is
because the setAutoFlush(false) make put() write into the buffer. But the
algorithm in my loading process requires to read the value of the previous
one that just is put into the HTable cell. I have tried to make
setAutoFlush(true), although the previous value can be read but the loading
process is slower down by about an order of magnitude. Can I get() value
directly from the write buffer? Are there any other solutions to this
problem that I do not know? Thank you in advance!

 Best regards,

Xin Wang

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message