hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apekshit Sharma <a...@cloudera.com>
Subject [DISCUSS] Coprocessor major design changes HBASE-17732
Date Thu, 07 Sep 2017 00:07:17 GMT

Links: HBASE-17732 <https://issues.apache.org/jira/browse/HBASE-17732>,  Code
Review <https://reviews.apache.org/r/62141/>

With 2.0 beta 1 approaching, this seems to be the ripe time to make much
needed coprocessor design changes. Here's a summary of what's changing
(from jira description):

The two main changes are:

   - *Adding template for coprocessor type to CoprocessorEnvironment i.e.
   interface CoprocessorEnvironment<C extends Coprocessor>*
      - Enables us to load only relevant coprocessors in hosts. Right now
      each type of host loads all types of coprocs and it's only during
      execOperation that it checks if the coproc is of correct type i.e.
      XCoprocessorHost will load XObserver, YObserver, and all others, and will
      check in execOperation if coproc instanceOf XObserver and ignore the rest.
      - Allow sharing of a bunch functions/classes which are currently
      duplicated in each host. For eg. CoprocessorOperations,
      CoprocessorOperationWithResult, execOperations().
   - *Introduce 4 coprocessor classes and use composition between these new
   classes and and old observers*
      - The real gold here is, moving forward, we'll be able to break down
      giant everything-in-one observers (masterobserver has 100+
functions) into
      smaller, more focused observers. These smaller observer can then have
      different compat guarantees!!

There's a more detailed analysis/design doc which discusses motivation
behind the changes:

Impact on third party:
- Although it'll break every coprocessor out there, the change to make
things work again will be very tiny. Look at the changes I had to do to
Coprocessors in our tests. It's just few simple lines.
- CoprocessorService will be backward compatible.

Status: Almost code complete. Fixing last 2-3 tests and adding a test to
ensure backward compatibility of CoprocessorService.

Jira: https://issues.apache.org/jira/browse/HBASE-17732
Code review: https://reviews.apache.org/r/62141/

-- Appy

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message