hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-19301) Provide way for CPs to create short circuited connection with custom configurations
Date Thu, 07 Dec 2017 14:45:00 GMT

     [ https://issues.apache.org/jira/browse/HBASE-19301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

stack resolved HBASE-19301.
---------------------------
      Resolution: Fixed
    Release Note: 
Provided a way for the CP users to create a short circuitable connection with custom configs.

createConnection(Configuration) is added to MasterCoprocessorEnvironment, RegionServerCoprocessorEnvironment
and RegionCoprocessorEnvironment.

The getConnection() method already available in these Env interfaces returns the cluster connection
used by the server (which the server also uses) where as this new method will create a new
connection on request. The difference from connection created using ConnectionFactory APIs
is that this connection can short circuit the calls to same server avoiding the RPC paths.
The connection will NOT be cached/maintained by server. That should be done the CPs.

Be careful creating Connections out of a Coprocessor. See the javadoc on these createConnection
and getConnection.

  was:
Provided a way for the CP users to create a short circuitable connection with custom configs.
createConnection(Configuration) is added to MasterCoprocessorEnvironment, RegionServerCoprocessorEnvironment
and RegionCoprocessorEnvironment.
The getConnection() version available in these Env interfaces return a single cluster connection
created at the server (which server also uses) where as this new method will create new connection.
The difference from connection created at client side (using ConnectionFactory APIs) is that
this connection can short circuit the calls to same server avoiding the RPC paths. The connection
will NOT be cached/maintained by server. That should be done the CPs.


Pushed to branch-2 and master. Thanks for the reviews. Reclosing.

> Provide way for CPs to create short circuited connection with custom configurations
> -----------------------------------------------------------------------------------
>
>                 Key: HBASE-19301
>                 URL: https://issues.apache.org/jira/browse/HBASE-19301
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-19301-addendum.patch, HBASE-19301.master.001.patch, HBASE-19301.patch,
HBASE-19301_V2.patch, HBASE-19301_V2.patch
>
>
> Over in HBASE-18359 we have discussions for this.
> Right now HBase provide getConnection() in RegionCPEnv, MasterCPEnv etc. But this returns
a pre created connection (per server).  This uses the configs at hbase-site.xml at that server.

> Phoenix needs creating connection in CP with some custom configs. Having this custom
changes in hbase-site.xml is harmful as that will affect all connections been created at that
server.
> This issue is for providing an overloaded getConnection(Configuration) API



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message