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

New TableServers instance if new HBaseConfiguration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      Down in guts of TableServers is a static map keyed by HBaseConfiguration instance. If in such as HTable constructor, you keep passing the same HBaseConfiguration instance, then you will get back a previously made TableServers with cached region locations, zk connection setup, etc. If you pass a new HBaseConfiguration each time, then on each new HTable, a new TableServers instance will be built with attendant zk setup and resource costs etc.

      Users are surprised by this behavior: "What seems like a bug to me is that the configuration object is caching state. I understand if HTable hangs on to connections until it is closed. And I understand how calling new HTABLE twice might open a new connection. That all seems okay. What I wouldn't expect is that using an old configuration object will give me different behavior from using a new one. A configuration seems like a static thing to me. It should only change if I change it." – Our Jim Firby

      Attachments

        Activity

          People

            Unassigned Unassigned
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: