Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18169 Coprocessor fix and cleanup before 2.0.0 release
  3. HBASE-19301

Provide way for CPs to create short circuited connection with custom configurations

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1, 2.0.0
    • Coprocessors
    • None
    • Reviewed
    • Hide
      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.
      Show
      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.

    Description

      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

      Attachments

        1. HBASE-19301-addendum.patch
          5 kB
          Anoop Sam John
        2. HBASE-19301.patch
          34 kB
          Anoop Sam John
        3. HBASE-19301.master.001.patch
          15 kB
          Michael Stack
        4. HBASE-19301_V2.patch
          38 kB
          Anoop Sam John
        5. HBASE-19301_V2.patch
          38 kB
          Anoop Sam John

        Issue Links

          Activity

            People

              anoop.hbase Anoop Sam John
              anoop.hbase Anoop Sam John
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: