@Override
  public long renewToken(Token<DelegationTokenIdentifier> token, String renewer) throws IOException {
    // since renewal is KERBEROS authenticated token may not be cached
    final DelegationTokenIdentifier id = getTokenIdentifier(token);
    DelegationTokenInformation tokenInfo = this.tokenStore.getToken(id);
    if (tokenInfo == null) {
        throw new InvalidToken("token does not exist: " + id); // no token found
    }
    // ensure associated master key is available
    if (!super.allKeys.containsKey(id.getMasterKeyId())) {
      LOGGER.info("Unknown master key (id={}), (re)loading keys from token store.",
        id.getMasterKeyId());
      reloadKeys();
    }
    // reuse super renewal logic
    synchronized (this) {
      super.currentTokens.put(id,  tokenInfo);
      try {
        long res = super.renewToken(token, renewer);
        this.tokenStore.removeToken(id);
        DelegationTokenInformation updatedToken = super.currentTokens.get(id);
        this.tokenStore.addToken(id, updatedToken);
        LOGGER.info("Successfully renewed token : " + id + ", Renewal time now is: " +
                Time.formatTime(updatedToken.getRenewDate()));
        return res;

      } finally {
        super.currentTokens.remove(id);
      }
    }
  }
Create the password and add it to shared store.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/TokenStoreDelegationTokenSecretManager.java