hbase mvcc

1635 단어 hbase
MVCC 관련 소스 코드:
  HBase put 소스 코드 에서http://blackproof.iteye.com/blog/2197710
  화면 음악 cc 는 hregion 의 화면 음악 cc 의 write point 로 화면 음악 cc 의 readpoint 를 생 성 합 니 다.
  KeyValueHeap 클래스 의 next 가 cell 을 가 져 올 때 keyvalue 의 mvcc readpoint 를 사용 하여 현재 kv 를 가 져 올 지 여 부 를 판단 합 니 다.
  
/**
   * Gets the next row of keys from the top-most scanner.
   * 

* This method takes care of updating the heap. *

* This can ONLY be called when you are using Scanners that implement * InternalScanner as well as KeyValueScanner (a {@link StoreScanner}). * @param result * @param limit * @return true if there are more keys, false if all scanners are done */ public boolean next(List result, int limit) throws IOException { if (this.current == null) { return false; } InternalScanner currentAsInternal = (InternalScanner)this.current; boolean mayContainMoreRows = currentAsInternal.next(result, limit); KeyValue pee = this.current.peek(); /* * By definition, any InternalScanner must return false only when it has no * further rows to be fetched. So, we can close a scanner if it returns * false. All existing implementations seem to be fine with this. It is much * more efficient to close scanners which are not needed than keep them in * the heap. This is also required for certain optimizations. */ if (pee == null || !mayContainMoreRows) { this.current.close(); } else { this.heap.add(this.current); } this.current = pollRealKV(); return (this.current != null); }


좋은 웹페이지 즐겨찾기