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

MetastoreClient not being cached

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.3.0
    • Fix Version/s: 0.4.0
    • Component/s: Metastore
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: