Search in sources :

Example 1 with NullRMStateStore

use of org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore in project hadoop by apache.

the class TestClientRMTokens method createRMDelegationTokenSecretManager.

private static RMDelegationTokenSecretManager createRMDelegationTokenSecretManager(long secretKeyInterval, long tokenMaxLifetime, long tokenRenewInterval) {
    RMContext rmContext = mock(RMContext.class);
    when(rmContext.getStateStore()).thenReturn(new NullRMStateStore());
    RMDelegationTokenSecretManager rmDtSecretManager = new RMDelegationTokenSecretManager(secretKeyInterval, tokenMaxLifetime, tokenRenewInterval, 3600000, rmContext);
    return rmDtSecretManager;
}
Also used : RMDelegationTokenSecretManager(org.apache.hadoop.yarn.server.resourcemanager.security.RMDelegationTokenSecretManager) NullRMStateStore(org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore)

Example 2 with NullRMStateStore

use of org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore in project hadoop by apache.

the class TestTokenClientRMService method setupSecretManager.

@BeforeClass
public static void setupSecretManager() throws IOException {
    RMContext rmContext = mock(RMContext.class);
    when(rmContext.getStateStore()).thenReturn(new NullRMStateStore());
    dtsm = new RMDelegationTokenSecretManager(60000, 60000, 60000, 60000, rmContext);
    dtsm.startThreads();
    Configuration conf = new Configuration();
    conf.set("hadoop.security.authentication", "kerberos");
    conf.set("hadoop.security.auth_to_local", kerberosRule);
    UserGroupInformation.setConfiguration(conf);
}
Also used : RMDelegationTokenSecretManager(org.apache.hadoop.yarn.server.resourcemanager.security.RMDelegationTokenSecretManager) Configuration(org.apache.hadoop.conf.Configuration) NullRMStateStore(org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore) BeforeClass(org.junit.BeforeClass)

Aggregations

NullRMStateStore (org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore)2 RMDelegationTokenSecretManager (org.apache.hadoop.yarn.server.resourcemanager.security.RMDelegationTokenSecretManager)2 Configuration (org.apache.hadoop.conf.Configuration)1 BeforeClass (org.junit.BeforeClass)1