hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihang Karajgaonkar (JIRA)" <>
Subject [jira] [Created] (HIVE-17371) Fix DBTokenStore and ZKTokenStore for the stand-alone metastore
Date Tue, 22 Aug 2017 15:27:00 GMT
Vihang Karajgaonkar created HIVE-17371:

             Summary: Fix DBTokenStore and ZKTokenStore for the stand-alone metastore
                 Key: HIVE-17371
             Project: Hive
          Issue Type: Sub-task
            Reporter: Vihang Karajgaonkar
            Assignee: Vihang Karajgaonkar

The {{getTokenStore}} method will not work for the {{DBTokenStore}} and {{ZKTokenStore}} since
they implement {{org.apache.hadoop.hive.thrift.DelegationTokenStore}} instead of  {{}}

private DelegationTokenStore getTokenStore(Configuration conf) throws IOException {
    String tokenStoreClassName =
        MetastoreConf.getVar(conf, MetastoreConf.ConfVars.DELEGATION_TOKEN_STORE_CLS, "");
    // The second half of this if is to catch cases where users are passing in a HiveConf
    // configuration.  It will have set the default value of
    // " .class" to
    // "org.apache.hadoop.hive.thrift.MemoryTokenStore" as part of its construction.  But
this is
    // the hive-shims version of the memory store.  We want to convert this to our default
    if (StringUtils.isBlank(tokenStoreClassName) ||
        "org.apache.hadoop.hive.thrift.MemoryTokenStore".equals(tokenStoreClassName)) {
      return new MemoryTokenStore();
    try {
      Class<? extends DelegationTokenStore> storeClass =
      return ReflectionUtils.newInstance(storeClass, conf);
    } catch (ClassNotFoundException e) {
      throw new IOException("Error initializing delegation token store: " + tokenStoreClassName,

This message was sent by Atlassian JIRA

View raw message