hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop John <anoop.hb...@gmail.com>
Subject Re: Why HBase scan HFile first, before scan memstore?
Date Mon, 17 Oct 2016 06:04:37 GMT
Over all these scanners we will be creating a Heap. (See in
StoreScanner where we make KeyValueHeap).   Out of this cells come in
their key order.  So said that, we will be opening and seeking to all
scanners and get cur cells from all.. Based on the comparator result
of all these cells emerge out from Heap.  So it is not that we will
scan HFile scanners first and then do scan over memstore. Make sense?

-Anoop-

On Mon, Oct 17, 2016 at 11:04 AM, Xi Yang <alex.xi.yang@gmail.com> wrote:
> I found codes in HStore.java
>
> List<StoreFileScanner> sfScanners =
> StoreFileScanner.getScannersForStoreFiles(files,
>       cacheBlocks, usePread, isCompaction, false, matcher, readPt,
> isPrimaryReplicaStore());
>     List<KeyValueScanner> scanners = new
> ArrayList<KeyValueScanner>(sfScanners.size() + 1);
>     scanners.addAll(sfScanners);
>     // Then the memstore scanners
>     if (memStoreScanners != null) {
>       scanners.addAll(memStoreScanners);
>     }
>
> So is it mean before scan memstore it will scan HFile first?
> Why not scan memstore first, because memory is always faster then hard disk?
>
>
> Thanks,
> Alex

Mime
View raw message