Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5399

Cut the link between the client and the zookeeper ensemble

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.94.0
    • 0.95.0
    • Client
    • None
    • all

    • Reviewed

    Description

      The link is often considered as an issue, for various reasons. One of them being that there is a limit on the number of connection that ZK can manage. Stack was suggesting as well to remove the link to master from HConnection.

      There are choices to be made considering the existing API (that we don't want to break).

      The first patches I will submit on hadoop-qa should not be committed: they are here to show the progress on the direction taken.

      ZooKeeper is used for:

      • public getter, to let the client do whatever he wants, and close ZooKeeper when closing the connection => we have to deprecate this but keep it.
      • read get master address to create a master => now done with a temporary zookeeper connection
      • read root location => now done with a temporary zookeeper connection, but questionable. Used in public function "locateRegion". To be reworked.
      • read cluster id => now done once with a temporary zookeeper connection.
      • check if base done is available => now done once with a zookeeper connection given as a parameter
      • isTableDisabled/isTableAvailable => public functions, now done with a temporary zookeeper connection.
      • Called internally from HBaseAdmin and HTable
      • getCurrentNrHRS(): public function to get the number of region servers and create a pool of thread => now done with a temporary zookeeper connection
        -

      Master is used for:

      • getMaster public getter, as for ZooKeeper => we have to deprecate this but keep it.
      • isMasterRunning(): public function, used internally by HMerge & HBaseAdmin
      • getHTableDescriptor*: public functions offering access to the master. => we could make them using a temporary master connection as well.

      Main points are:

      • hbase class for ZooKeeper; ZooKeeperWatcher is really designed for a strongly coupled architecture . This can be changed, but requires a lot of modifications in these classes (likely adding a class in the middle of the hierarchy, something like that). Anyway, non connected client will always be really slower, because it's a tcp connection, and establishing a tcp connection is slow.
      • having a link between ZK and all the client seems to make sense for some Use Cases. However, it won't scale if a TCP connection is required for every client
      • if we move the table descriptor part away from the client, we need to find a new place for it.
      • we will have the same issue if HBaseAdmin (for both ZK & Master), may be we can put a timeout on the connection. That would make the whole system less deterministic however.

      Attachments

        1. nochange.patch
          0.3 kB
          Nicolas Liochon
        2. 5399.v42.patch
          116 kB
          Nicolas Liochon
        3. 5399.v42.patch
          116 kB
          Nicolas Liochon
        4. 5399.v42.patch
          116 kB
          Nicolas Liochon
        5. 5399.v42.patch
          116 kB
          Nicolas Liochon
        6. 5399.v41.patch
          117 kB
          Nicolas Liochon
        7. 5399.v40.patch
          116 kB
          Nicolas Liochon
        8. 5399.v39.patch
          116 kB
          Nicolas Liochon
        9. 5399.v38.patch
          112 kB
          Nicolas Liochon
        10. 5399_inprogress.v32.patch
          116 kB
          Nicolas Liochon
        11. 5399.v27.patch
          100 kB
          Nicolas Liochon
        12. 5399_inprogress.v23.patch
          98 kB
          Nicolas Liochon
        13. 5399_inprogress.v21.patch
          97 kB
          Nicolas Liochon
        14. 5399_inprogress.v20.patch
          95 kB
          Nicolas Liochon
        15. 5399_inprogress.v18.patch
          98 kB
          Nicolas Liochon
        16. 5399_inprogress.v16.patch
          93 kB
          Nicolas Liochon
        17. ASF.LICENSE.NOT.GRANTED--5399_inprogress.v14.patch
          92 kB
          Nicolas Liochon
        18. 5399_inprogress.v9.patch
          90 kB
          Nicolas Liochon
        19. 5399_inprogress.v3.patch
          82 kB
          Nicolas Liochon
        20. 5399_inprogress.patch
          34 kB
          Nicolas Liochon

        Issue Links

          Activity

            People

              nkeywal Nicolas Liochon
              nkeywal Nicolas Liochon
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: