public static String addServiceToToken(String tokenStr, String tokenService) throws IOException {
    Token<DelegationTokenIdentifier> delegationToken = createToken(tokenStr, tokenService);
    return delegationToken.encodeToUrlString();
  }
Add a given service to delegation token string.

@param tokenStr
@param tokenService
@return
@throws IOException
service/src/java/org/apache/hive/service/cli/session/SessionUtils.java