hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Bertozzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11733) Avoid copy-paste in Master/Region CoprocessorHost
Date Thu, 14 Aug 2014 09:30:12 GMT

    [ https://issues.apache.org/jira/browse/HBASE-11733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096785#comment-14096785

Matteo Bertozzi commented on HBASE-11733:

{quote}Could this have performance implications, especially for hooks into hot paths like
preScannerNext(...), etc. We're creating one more object upon each invocation now.{quote}
correct, the other alternative that I had in mind was to use reflection and have something
like execOperation("preCreate", arg1, arg2) so you avoid the interface creation/scope-capture
but you have reflection and strings around.

the problem is that the CoprocessorHost is sort of unmaintainable, if you look at the code
you have some method with slightly variations and some fix not applied. Do you have other

> Avoid copy-paste in Master/Region CoprocessorHost
> -------------------------------------------------
>                 Key: HBASE-11733
>                 URL: https://issues.apache.org/jira/browse/HBASE-11733
>             Project: HBase
>          Issue Type: Bug
>          Components: Coprocessors
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>            Priority: Trivial
>             Fix For: 2.0.0
>         Attachments: HBASE-11733-v0.patch
> all the methods of MasterCoprocessorHost and RegionCoprocessorHost are copy-paste, and
a couple of them have some missing fixes.
> The body of each function is the same, the only difference is the call to the specific

This message was sent by Atlassian JIRA

View raw message