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

HtablePool constructor not reading config files in certain cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.90.6, 0.92.1, 0.94.1
    • 0.94.0, 0.95.0
    • Client
    • None
    • Reviewed

    Description

      Creating a HtablePool can issue two behaviour depanding on the constructor called.

      Case 1: loads the configs from hbase-site
      public HTablePool()

      { this(HBaseConfiguration.create(), Integer.MAX_VALUE); }

      Calling this with null values for Configuration:
      public HTablePool(final Configuration config, final int maxSize)

      { this(config, maxSize, null, null); }

      will issue:

      public HTablePool(final Configuration config, final int maxSize,
      final HTableInterfaceFactory tableFactory, PoolType poolType) {
      // Make a new configuration instance so I can safely cleanup when
      // done with the pool.
      this.config = config == null ? new Configuration() : config;

      which does not read the hbase-site config files as HBaseConfiguration.create() does.

      I've tracked this problem to all versions of hbase.

      Attachments

        1. different-config-behaviour.patch
          0.7 kB
          Ioan Eugen Stan
        2. different-config-behaviour.90.patch
          0.7 kB
          Michael Stack
        3. different-config-behaviour.90.patch
          0.7 kB
          Michael Stack

        Activity

          People

            ieugen Ioan Eugen Stan
            ieugen Ioan Eugen Stan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: