@Override
  public IMetaStoreClient getHiveMetastoreClient() throws HiveAuthzPluginException {
    String errMsg = "Error getting metastore client";
    try {
      return Hive.get().getMSC();
    } catch (MetaException e) {
      throw new HiveAuthzPluginException(errMsg, e);
    } catch (HiveException e) {
      throw new HiveAuthzPluginException(errMsg, e);
    }
  }
Private implementaiton that returns instance of IMetaStoreClient
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveMetastoreClientFactoryImpl.java