Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-816

MetastoreClient not being cached

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.3.0
    • 0.4.0
    • Metastore
    • None
    • Reviewed
    • HIVE-816. Cache MetastoreClient. (Dave Lerman via zshao)

    Description

      In org.apache.hadoop.hive.ql.metadata.Hive.getMSC(), we create a new MetaStoreClient on every call because the result is not getting properly cached in the threadLocal:

        private IMetaStoreClient getMSC() throws MetaException {
          IMetaStoreClient msc = threadLocalMSC.get();
          if(msc == null) {
            msc = this.createMetaStoreClient();
            // THERE SHOULD BE A threadLocalMSC.set here!
          }
          return msc;
        }
      

      Attachments

        1. HIVE-816.patch
          0.5 kB
          Dave Lerman

        Activity

          People

            dlerman Dave Lerman
            dlerman Dave Lerman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: