Class HadoopKerberosName

java.lang.Object
org.apache.hadoop.security.authentication.util.KerberosName
org.apache.hadoop.security.HadoopKerberosName

@LimitedPrivate({"HDFS","MapReduce"}) @Evolving public class HadoopKerberosName extends org.apache.hadoop.security.authentication.util.KerberosName
This class implements parsing and handling of Kerberos principal names. In particular, it splits them apart and translates them down into local operating system names.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.security.authentication.util.KerberosName

    org.apache.hadoop.security.authentication.util.KerberosName.BadFormatString, org.apache.hadoop.security.authentication.util.KerberosName.NoMatchingRule
  • Field Summary

    Fields inherited from class org.apache.hadoop.security.authentication.util.KerberosName

    DEFAULT_MECHANISM, MECHANISM_HADOOP, MECHANISM_MIT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a name from the full Kerberos principal name.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
     
    static void
    Set the static configuration to get and evaluate the rules.

    Methods inherited from class org.apache.hadoop.security.authentication.util.KerberosName

    getDefaultRealm, getHostName, getRealm, getRuleMechanism, getRules, getServiceName, getShortName, hasRuleMechanismBeenSet, hasRulesBeenSet, resetDefaultRealm, setRuleMechanism, setRules, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HadoopKerberosName

      public HadoopKerberosName(String name)
      Create a name from the full Kerberos principal name.
      Parameters:
      name - name.
  • Method Details

    • setConfiguration

      public static void setConfiguration(Configuration conf) throws IOException
      Set the static configuration to get and evaluate the rules.

      IMPORTANT: This method does a NOP if the rules have been set already. If there is a need to reset the rules, the KerberosName.setRules(String) method should be invoked directly.

      Parameters:
      conf - the new configuration
      Throws:
      IOException - raised on errors performing I/O.
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception