[
https://issues.apache.org/jira/browse/HBASE-10047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13853542#comment-13853542
]
Andrew Purtell commented on HBASE-10047:
----------------------------------------
I think this is a reasonable strategy, if the CP framework itself is getting in
the way, skip the upcalls if there are no users. We can do it case by case.
We only get the additional reflection overhead at load time. You can break out
of this loop if you find one for a tiny bit of savings:
{code}
+ boolean hasCustomPostScannerFilterRow = false;
+ for (RegionEnvironment env: coprocessors) {
+ if (env.getInstance() instanceof RegionObserver) {
+ try {
+
env.getInstance().getClass().getDeclaredMethod("postScannerFilterRow",
ObserverContext.class,
+ InternalScanner.class, byte[].class, boolean.class);
+ hasCustomPostScannerFilterRow = true;
+ } catch (NoSuchMethodException ignore) {
+ }
+ }
+ }
+ this.hasCustomPostScannerFilterRow = hasCustomPostScannerFilterRow;
{code}
> postScannerFilterRow consumes a lot of CPU in tall table scans
> --------------------------------------------------------------
>
> Key: HBASE-10047
> URL: https://issues.apache.org/jira/browse/HBASE-10047
> Project: HBase
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Attachments: 10047-0.94-sample.txt, postScannerFilterRow.png
>
>
> Continuing my profiling quest, I find that in scanning tall table (and
> filtering everything on the server) a quarter of the time is now spent in the
> postScannerFilterRow coprocessor hook.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)