code: public Token<DelegationTokenIdentifier> createDelegationToken(String renewer) throws IOException {
      Text renewerText = new Text();
      if (renewer != null) {
        renewerText.set(renewer);
      }
  
      DelegationTokenIdentifier tokenIdentifier =
          requireNonNull(createTokenIdentifier(renewerText), "Token identifier");
  
      Token<DelegationTokenIdentifier> token = new Token<>(tokenIdentifier, secretManager);
      token.setKind(getKind());
      token.setService(service);
      logger.atFine().log("Created token %s with token identifier %s", token, tokenIdentifier);
      return token;
    }
docs: Create a delegation token for the user. This will only be called if a new DT is needed, that
  is: the filesystem has been deployed unbound.
  
  @return the token
  @throws IOException if one cannot be created