Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> question about the scanner ordering for gets/scans


Copy link to this message
-
答复: question about the scanner ordering for gets/scans
IMHO, this sorting is not necessary,  to be honest, i had tried to exchange the order of sfScanners&memStoreScanners several days before just out of curiosity, and passed all the test cases:)

Regards,
Liang
________________________________________
发件人: Sergey Shelukhin [[EMAIL PROTECTED]]
发送时间: 2013年1月31日 8:44
收件人: [EMAIL PROTECTED]
主题: question about the scanner ordering for gets/scans

Hi. When we build the scanner for scan or get, we make sure to add scanners
in sorted order.

    // First the store file scanners
>
>     // TODO this used to get the store files in descending order,
>     // but now we get them in ascending order, which I think is
>     // actually more correct, since memstore get put at the end.
>     List<StoreFileScanner> sfScanners = StoreFileScanner
>       .getScannersForStoreFiles(storeFilesToScan, cacheBlocks, isGet,
> isCompaction, matcher);
>     List<KeyValueScanner> scanners >       new ArrayList<KeyValueScanner>(sfScanners.size()+1);
>     scanners.addAll(sfScanners);
>     // Then the memstore scanners
>     scanners.addAll(memStoreScanners);
>

I have read the code for scanning/around this area and have a question,
does order of scanners actually matter? It looks like we insert them into
heap structure and seek/peek them all anyway, and compare separately by
seqNum in KeyValueHeap::KVScannerComparator.
Is sorting really needed for this particular place (above code)?
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB