Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18898

Provide way for the core flow to know whether CP implemented each of the hooks

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Coprocessors, Performance
    • Labels:
      None

      Description

      This came as a discussion topic at the tale of HBASE-17732
      Can we have a way in the code (before trying to call the hook) to know whether the user has implemented one particular hook or not? eg: On write related hooks only prePut() might be what the user CP implemented. All others are just dummy impl from the interface. Can we have a way for the core code to know this and avoid the call to other dummy hooks fully? Some times we do some processing for just calling CP hooks (Say we have to make a POJO out of PB object for calling) and if the user CP not impl this hook, we can avoid this extra work fully. The pain of this will be more when we have to later deprecate one hook and add new. So the dummy impl in new hook has to call the old one and that might be doing some extra work normally.
      If the CP f/w itself is having a way to tell this, the core code can make use. What am expecting is some thing like in PB way where we can call
      CPObject.hasPreXXXX(), then CPObject. preXXXX ().. Should not like asking users to impl this extra ugly thing. When the CP instance is loaded in the RS/HM, that object will be having this info also.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                anoop.hbase Anoop Sam John
                Reporter:
                anoop.hbase Anoop Sam John
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: