本文整理了Java中org.apache.hadoop.hive.shims.Utils.createToken()
方法的一些代码示例,展示了Utils.createToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.createToken()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.shims.Utils
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!