[
https://issues.apache.org/jira/browse/HBASE-9769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795519#comment-13795519
]
Vladimir Rodionov commented on HBASE-9769:
------------------------------------------
The main idea is to provide new Scanner's hint (via new attribute) for RS -
something SCAN-SMALL-ROWS and in Store.getScanners we will check for this
attribute and if it is present we use StoreSCanner ctor with NULL as columns
set:
{code}
public KeyValueScanner getScanner(Scan scan,
final NavigableSet<byte []> targetCols) throws IOException {
lock.readLock().lock();
boolean smallRowsScan = scan.getAttribute("SCAN-SMALL-ROWS") != null;
if(smallRowsScan){
Filter ecFilter = new ExplicitColumnsFilter(targetCols);
// update filter in Scan with ecFilter
// remove columnFamilyMap from Scan
}
try {
KeyValueScanner scanner = null;
if (getHRegion().getCoprocessorHost() != null) {
scanner = getHRegion().getCoprocessorHost().preStoreScannerOpen(this,
scan, smallRowsScan? null: targetCols);
}
if (scanner == null) {
scanner = new StoreScanner(this, getScanInfo(), scan, smallRowsScan?
null: targetCols:targetCols);
}
return scanner;
} finally {
lock.readLock().unlock();
}
}
{code}
If no attribute than - default path
> Improve performance of a Scanner with explicit column list when rows are
> small/medium size
> ------------------------------------------------------------------------------------------
>
> Key: HBASE-9769
> URL: https://issues.apache.org/jira/browse/HBASE-9769
> Project: HBase
> Issue Type: Improvement
> Components: Scanners
> Affects Versions: 0.98.0, 0.94.12, 0.96.0
> Reporter: Vladimir Rodionov
> Assignee: Vladimir Rodionov
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)