nosql
[hbase] ACID in HBase
'김용환'
2013. 4. 29. 18:30
Hbase진형에서 ACID 관련 질문시, 3개의 문서를 공유해준다. (users@
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:
- lock the row(s), to guard against concurrent writes to the same row(s)
- retrieve the current writenumber
- apply changes to the WAL (Write Ahead Log)
- apply the changes to the Memstore (using the acquired writenumber to tag the KeyValues)
- commit the transaction, i.e. attempt to roll the Readpoint forward to the acquired Writenumber.
- unlock the row(s)
The highlevel flow of a read transaction looks like this:
- open the scanner
- get the current readpoint
- filter all scanned KeyValues with memstore timestamp > the readpoint
- 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).
HBASE-5569 finally enables the same logic for the delete markers (and hence deleted KeyValues).
....
3. ACID
Hbase문서 - Hbase acid