public class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static String |
addServiceToToken(String tokenStr,
String tokenService)
Add a given service to delegation token string.
|
static String |
getTokenStrForm(String tokenSignature)
Get the string form of the token given a token signature.
|
static org.apache.hadoop.security.UserGroupInformation |
getUGI() |
static void |
setTokenStr(org.apache.hadoop.security.UserGroupInformation ugi,
String tokenStr,
String tokenService)
Create a delegation token object for the given token string and service.
|
static void |
setZookeeperClientKerberosJaasConfig(String principal,
String keyTabFile)
Dynamically sets up the JAAS configuration that uses kerberos
|
public static org.apache.hadoop.security.UserGroupInformation getUGI() throws LoginException, IOException
LoginException
IOException
public static String getTokenStrForm(String tokenSignature) throws IOException
tokenSignature
- IOException
public static void setTokenStr(org.apache.hadoop.security.UserGroupInformation ugi, String tokenStr, String tokenService) throws IOException
ugi
- tokenStr
- tokenService
- IOException
public static String addServiceToToken(String tokenStr, String tokenService) throws IOException
tokenStr
- tokenService
- IOException
public static void setZookeeperClientKerberosJaasConfig(String principal, String keyTabFile) throws IOException
principal
- keyTabFile
- IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.