XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Standalone Metastore
    • None

    Description

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

      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 for
          // configuration.  It will have set the default value of
          // "hive.cluster.delegation.token.store .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 value.
          if (StringUtils.isBlank(tokenStoreClassName) ||
              "org.apache.hadoop.hive.thrift.MemoryTokenStore".equals(tokenStoreClassName)) {
            return new MemoryTokenStore();
          }
          try {
            Class<? extends DelegationTokenStore> storeClass =
                Class.forName(tokenStoreClassName).asSubclass(DelegationTokenStore.class);
            return ReflectionUtils.newInstance(storeClass, conf);
          } catch (ClassNotFoundException e) {
            throw new IOException("Error initializing delegation token store: " + tokenStoreClassName, e);
          }
        }
      

      Attachments

        1. HIVE-17371.01.patch
          155 kB
          Vihang Karajgaonkar
        2. HIVE-17371.02.patch
          191 kB
          Vihang Karajgaonkar
        3. HIVE-17371.03.patch
          197 kB
          Vihang Karajgaonkar
        4. HIVE-17371.04.patch
          198 kB
          Vihang Karajgaonkar
        5. HIVE-17371.05.patch
          198 kB
          Vihang Karajgaonkar
        6. HIVE-17371.06.patch
          198 kB
          Vihang Karajgaonkar

        Issue Links

          Activity

            People

              vihangk1 Vihang Karajgaonkar
              vihangk1 Vihang Karajgaonkar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: