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.y...@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