Details
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; }