Class KerberosAuthentication


  • public class KerberosAuthentication
    extends Object
    • Constructor Detail

      • KerberosAuthentication

        public KerberosAuthentication​(org.apache.hadoop.conf.Configuration configuration,
                                      String username,
                                      String keyTabFileLocation)
        Parameters:
        configuration - - hdfs configuration
        username - - Principal used to authenticate to the kerberos server
        keyTabFileLocation - - keyTab file location
    • Method Detail

      • loginWithKeytab

        public void loginWithKeytab()
                             throws IOException
        In order to connect to a hadoop cluster using Kerberos you need to add your own filesystem to the cache of the FileSystem component. This is done by setting the uri that you use in your camel route as the URI that is used to setup the connection. The URI is used as key when adding it to the cache (default functionality of the static FileSystem.get(URI, Configuration) method).
        Throws:
        IOException - - In case of error