public static UnixUserGroupInformation login ( Configuration conf , boolean save ) throws LoginException { UnixUserGroupInformation ugi = readFromConf ( conf , UGI_PROPERTY_NAME ) ; if ( ugi == null ) { ugi = login ( ) ; LOG . debug ( "Unix Login: " + ugi ) ; if ( save ) { saveToConf ( conf , UGI_PROPERTY_NAME , ugi ) ; } } return ugi ; }
Get a user s name & its group names from the given configuration ; If it is not defined in the configuration get the current user s information from Unix . If the user has a UGI in the ugi map return the one in the UGI map .