[ https://issues.apache.org/jira/browse/HBASE-19301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279700#comment-16279700 ]
stack commented on HBASE-19301: ------------------------------- Yeah, CoreCoprocessors may make heavy-use of the RS Connection. I suppose they'd do this even after we integrate them into core. bq. Ya with warn expose to CPs is fine. But better do not ? Yes. Would be better if not, but I think we are out of time for messing around here. We've done a good cleanup in hbase2. This will be a rough edge, something to work on in hbase3. What you think? bq. But till 1.x we have only this way. Agree. It is a problem though, right. Each CP instance w/ a Connection goes to hbase:meta scanning to find locations. Each instance has to warm its own cache. What you think [~anoop.hbase] (and [~zghaobac])? I can put up a patch that keeps getConnection with a warning that it is the RS's connection and only for light-loading (e.g. create table if it does not exist on start...admin-functions). If you need to do heavy-connection work, create your own. I'll doc how CP can do it at CP start though it means an ugly cast of the passed in CoprocessorEnvironment so they get at the createConnection method (will doc. too how createConnection does short-circuit. If they don't need short-circuit, then they should do ConnectionFactory). Ok for hbase2? > 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.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)