hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19007) Align Services Interfaces in Master and RegionServer
Date Sat, 14 Oct 2017 18:12:00 GMT

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

stack commented on HBASE-19007:

bq. Means the CP required things in RS side like getConnection() will be added to RegionServerCoprocessorEnvironment

To satisfy need for getConnection, getConfiguration, isStopping, etc., we would do s/getRegionServices/getServer/
in RegionServerCoprocessorEnvironment and ditton in MasterCoprocessorEnvironment, we'd s/getMasterServices/getServer.
The call to getServer would return the Server Interface. Server Interface would look mostly
like the below:

// This Interface shines through MasterServices and RegionServerServices. They subclass it.
// Be careful what you add here. Make sure it ok for CPs to have access else add elsewhere.
public interface Server extends Abortable, Stoppable {
  Configuration getConfiguration();
  ZooKeeperWatcher getZooKeeper();
  Connection getConnection();
  ServerName getServerName();
  ChoreService getChoreService();

i.e. it would be changed to be IA.LP. The methods would be basically what is in the above
with some minor edit.

So, if you need to make a connection in your CP, you'd do env.getServer().getConnection(),

bq. But CPRSS now extend ImmutableOnlineRegions also and functions there will be needed by
RS side hooks (Region level or RS level hooks)
We can 1st list down what all needed at MS level, RS level, Region level and WAL level.

We'd remove CPRSSS. Anything not available in Server, we'd instead make availalble as a method
on RegionServerCoprocessorEnvironment.

bq, I have a concern. This means we expose the APIs from Abortable and Stoppable which include
calls to abort() and stop.

This is valid. Server therefore needs an edit so it only exposes read-only aspects of Stoppable/Abortable.

bq. I checked Phoenix code, they seem to call this in 2 or 3 places !! What a CP instead should
do is throw some IOE from CP hook and make the config 'hbase.coprocessor.abortonerror' as
true. (This is any way by def true only). Same with Stoppable also.

Agree. Do we have to add an CoprocessorAbortException for CPs to throw?

Let me redo the Master-side patch in accordance w/ this proposal. I'll edit Server so it only
exposes read-only methods. Thanks [~anoop.hbase]

> Align Services Interfaces in Master and RegionServer
> ----------------------------------------------------
>                 Key: HBASE-19007
>                 URL: https://issues.apache.org/jira/browse/HBASE-19007
>             Project: HBase
>          Issue Type: Task
>            Reporter: stack
>            Priority: Blocker
> HBASE-18183 adds a CoprocessorRegionServerService to give a view on RegionServiceServices
that is safe to expose to Coprocessors.
> On the Master-side, MasterServices becomes an Interface for exposing to Coprocessors.
> We need to align the two.
> For background, see https://issues.apache.org/jira/browse/HBASE-12260?focusedCommentId=16203820&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16203820

This message was sent by Atlassian JIRA

View raw message