[hbase] ACID in HBase

nosql 2013. 4. 29. 18:30


Hbase진형에서 ACID 관련 질문시, 3개의 문서를 공유해준다. (users@


1. ACID-semantics 

Hbase문서 - Hbase에서 간단하게 usage에 대한 설명 


2. ACID in Hbase (http://hadoop-hbase.blogspot.kr/2012/03/acid-in-hbase.html)

그나마 deep하게 잘 나온 블로그 내용.(개인)


재미있는 부분만 발췌

The highlevel flow of a write transaction in HBase looks like this:
  1. lock the row(s), to guard against concurrent writes to the same row(s)
  2. retrieve the current writenumber
  3. apply changes to the WAL (Write Ahead Log)
  4. apply the changes to the Memstore (using the acquired writenumber to tag the KeyValues)
  5. commit the transaction, i.e. attempt to roll the Readpoint forward to the acquired Writenumber.
  6. unlock the row(s)

The highlevel flow of a read transaction looks like this:
  1. open the scanner
  2. get the current readpoint
  3. filter all scanned KeyValues with memstore timestamp > the readpoint
  4. close the scanner (this is initiated by the client)

.....

Note that a reader acquires no locks at all, but we still get all of ACID. It is important to realize that this only works if transactions are committed strictly serially; otherwise an earlier uncommitted transaction could become visible when one that started later commits first. In HBase transaction are typically short, so this is not a problem. HBase does exactly that: All transactions are committed serially.

....

added with HBASE-2856, which allowed HBase to support ACID guarantees even with concurrent flushes.
HBASE-5569 finally enables the same logic for the delete markers (and hence deleted KeyValues).
....





3. ACID

Hbase문서 - Hbase acid





Posted by '김용환'
,