Search in sources :

Example 6 with KerberosUserNameMapper

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;
}
Also used : KerberosUserNameMapper(org.apache.ignite.hadoop.util.KerberosUserNameMapper)

Example 7 with KerberosUserNameMapper

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"));
}
Also used : KerberosUserNameMapper(org.apache.ignite.hadoop.util.KerberosUserNameMapper)

Aggregations

KerberosUserNameMapper (org.apache.ignite.hadoop.util.KerberosUserNameMapper)7 ChainedUserNameMapper (org.apache.ignite.hadoop.util.ChainedUserNameMapper)2 CachingHadoopFileSystemFactory (org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory)1 IgniteHadoopIgfsSecondaryFileSystem (org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem)1 BasicUserNameMapper (org.apache.ignite.hadoop.util.BasicUserNameMapper)1