org.apache.hadoop.hive.shims.Utils.createToken()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.apache.hadoop.hive.shims.Utils.createToken()方法的一些代码示例,展示了Utils.createToken()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.createToken()方法的具体详情如下:
包路径:org.apache.hadoop.hive.shims.Utils
类名称:Utils
方法名:createToken

Utils.createToken介绍

[英]Create a new token using the given string and service
[中]使用给定的字符串和服务创建一个新令牌

代码示例

代码示例来源:origin: com.github.hyukjinkwon.shims/hive-shims-common

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

代码示例来源:origin: com.facebook.presto.hive/hive-apache

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

代码示例来源:origin: com.facebook.presto.hive/hive-apache

/**
 * Create a delegation token object for the given token string and service.
 * Add the token to given UGI
 * @param ugi
 * @param tokenStr
 * @param tokenService
 * @throws IOException
 */
public static void setTokenStr(UserGroupInformation ugi, String tokenStr, String tokenService)
  throws IOException {
 Token<DelegationTokenIdentifier> delegationToken = createToken(tokenStr, tokenService);
 ugi.addToken(delegationToken);
}

代码示例来源:origin: com.github.hyukjinkwon.shims/hive-shims-common

/**
 * Create a delegation token object for the given token string and service.
 * Add the token to given UGI
 * @param ugi
 * @param tokenStr
 * @param tokenService
 * @throws IOException
 */
public static void setTokenStr(UserGroupInformation ugi, String tokenStr, String tokenService)
  throws IOException {
 Token<DelegationTokenIdentifier> delegationToken = createToken(tokenStr, tokenService);
 ugi.addToken(delegationToken);
}

相关文章