Example usage for org.apache.hadoop.fs CommonConfigurationKeys KERBEROS_TICKET_CACHE_PATH

List of usage examples for org.apache.hadoop.fs CommonConfigurationKeys KERBEROS_TICKET_CACHE_PATH

Introduction

In this page you can find the example usage for org.apache.hadoop.fs CommonConfigurationKeys KERBEROS_TICKET_CACHE_PATH.

Prototype

String KERBEROS_TICKET_CACHE_PATH

To view the source code for org.apache.hadoop.fs CommonConfigurationKeys KERBEROS_TICKET_CACHE_PATH.

Click Source Link

Usage

From source file:org.trustedanalytics.servicebroker.gearpump.yarn.YarnClientFactory.java

License:Apache License

public YarnClient getYarnClient() throws IOException, LoginException {
    kerberosService.login();//from   w  w w. j  a  v  a  2s  .c  om
    String ticketCachePath = yarnConfiguration.get(CommonConfigurationKeys.KERBEROS_TICKET_CACHE_PATH);
    UserGroupInformation ugi = UserGroupInformation.getBestUGI(ticketCachePath,
            kerberosService.getKerberosProperties().getUser());
    YarnClient yarnClient = new DelegatingYarnClient(YarnClient.createYarnClient(), new UgiWrapper(ugi));
    yarnClient.init(yarnConfiguration);
    yarnClient.start();
    return yarnClient;
}