use of org.apache.ignite.hadoop.util.KerberosUserNameMapper in project ignite by apache.
the class KerberosUserNameMapperSelfTest method create.
/**
* Create mapper.
*
* @param instance Instance.
* @param realm Realm.
* @return Mapper.
*/
private KerberosUserNameMapper create(@Nullable String instance, @Nullable String realm) {
KerberosUserNameMapper mapper = new KerberosUserNameMapper();
mapper.setInstance(instance);
mapper.setRealm(realm);
mapper.start();
return mapper;
}
use of org.apache.ignite.hadoop.util.KerberosUserNameMapper in project ignite by apache.
the class KerberosUserNameMapperSelfTest method testMapperInstance.
/**
* Test mapper with instance component.
*
* @throws Exception If failed.
*/
public void testMapperInstance() throws Exception {
KerberosUserNameMapper mapper = create(INSTANCE, null);
assertEquals(IgfsUtils.fixUserName(null) + "/" + INSTANCE, mapper.map(null));
assertEquals("test" + "/" + INSTANCE, mapper.map("test"));
}
Aggregations