org.apache.hadoop.yarn.server.resourcemanager.security.RMDelegationTokenSecretManager Java Examples
The following examples show how to use
org.apache.hadoop.yarn.server.resourcemanager.security.RMDelegationTokenSecretManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MyriadOperationsTest.java From incubator-myriad with Apache License 2.0 | 6 votes |
private RMContext generateRMContext(AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> scheduler) throws Exception { Configuration conf = new Configuration(); MockRMContext context = null; Dispatcher dispatcher = new MockDispatcher(); RMApplicationHistoryWriter rmApplicationHistoryWriter = new RMApplicationHistoryWriter(); AMLivelinessMonitor amLivelinessMonitor = new AMLivelinessMonitor(dispatcher); AMLivelinessMonitor amFinishingMonitor = new AMLivelinessMonitor(dispatcher); RMDelegationTokenSecretManager delegationTokenSecretManager = new RMDelegationTokenSecretManager(1, 1, 1, 1, context); context = new MockRMContext(); context.setStateStore(TestObjectFactory.getStateStore(conf, "tmp/myriad-operations-test")); context.setAmLivelinessMonitor(amLivelinessMonitor); context.setAmFinishingMonitor(amFinishingMonitor); context.setRMApplicationHistoryWriter(rmApplicationHistoryWriter); context.setRMDelegationTokenSecretManager(delegationTokenSecretManager); return context; }
Example #2
Source File: RMSecretManagerService.java From hadoop with Apache License 2.0 | 6 votes |
@VisibleForTesting protected RMDelegationTokenSecretManager createRMDelegationTokenSecretManager( Configuration conf, RMContext rmContext) { long secretKeyInterval = conf.getLong(YarnConfiguration.RM_DELEGATION_KEY_UPDATE_INTERVAL_KEY, YarnConfiguration.RM_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT); long tokenMaxLifetime = conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_KEY, YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT); long tokenRenewInterval = conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_KEY, YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT); return new RMDelegationTokenSecretManager(secretKeyInterval, tokenMaxLifetime, tokenRenewInterval, 3600000, rmContext); }
Example #3
Source File: RMSecretManagerService.java From big-c with Apache License 2.0 | 6 votes |
@VisibleForTesting protected RMDelegationTokenSecretManager createRMDelegationTokenSecretManager( Configuration conf, RMContext rmContext) { long secretKeyInterval = conf.getLong(YarnConfiguration.RM_DELEGATION_KEY_UPDATE_INTERVAL_KEY, YarnConfiguration.RM_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT); long tokenMaxLifetime = conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_KEY, YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT); long tokenRenewInterval = conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_KEY, YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT); return new RMDelegationTokenSecretManager(secretKeyInterval, tokenMaxLifetime, tokenRenewInterval, 3600000, rmContext); }
Example #4
Source File: TestKillApplicationWithRMHA.java From hadoop with Apache License 2.0 | 5 votes |
public MyClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager) { super(rmContext, scheduler, rmAppManager, applicationACLsManager, queueACLsManager, rmDTSecretManager); this.rmContext = rmContext; }
Example #5
Source File: TestClientRMTokens.java From big-c with Apache License 2.0 | 5 votes |
public ClientRMServiceForTest(Configuration conf, ResourceScheduler scheduler, RMDelegationTokenSecretManager rmDTSecretManager) { super(mock(RMContext.class), scheduler, mock(RMAppManager.class), new ApplicationACLsManager(conf), new QueueACLsManager(scheduler, conf), rmDTSecretManager); }
Example #6
Source File: TestClientRMTokens.java From big-c with Apache License 2.0 | 5 votes |
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; }
Example #7
Source File: ClientRMService.java From big-c with Apache License 2.0 | 5 votes |
public ClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager, Clock clock) { super(ClientRMService.class.getName()); this.scheduler = scheduler; this.rmContext = rmContext; this.rmAppManager = rmAppManager; this.applicationsACLsManager = applicationACLsManager; this.queueACLsManager = queueACLsManager; this.rmDTSecretManager = rmDTSecretManager; this.reservationSystem = rmContext.getReservationSystem(); this.clock = clock; this.rValidator = new ReservationInputValidator(clock); }
Example #8
Source File: ClientRMService.java From big-c with Apache License 2.0 | 5 votes |
public ClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager) { this(rmContext, scheduler, rmAppManager, applicationACLsManager, queueACLsManager, rmDTSecretManager, new UTCClock()); }
Example #9
Source File: TestKillApplicationWithRMHA.java From big-c with Apache License 2.0 | 5 votes |
public MyClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager) { super(rmContext, scheduler, rmAppManager, applicationACLsManager, queueACLsManager, rmDTSecretManager); this.rmContext = rmContext; }
Example #10
Source File: ProtocolHATestBase.java From hadoop with Apache License 2.0 | 5 votes |
public CustomedClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager) { super(rmContext, scheduler, rmAppManager, applicationACLsManager, queueACLsManager, rmDTSecretManager); }
Example #11
Source File: TestClientRMService.java From hadoop with Apache License 2.0 | 5 votes |
@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(); }
Example #12
Source File: TestClientRMTokens.java From hadoop with Apache License 2.0 | 5 votes |
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; }
Example #13
Source File: TestClientRMTokens.java From hadoop with Apache License 2.0 | 5 votes |
public ClientRMServiceForTest(Configuration conf, ResourceScheduler scheduler, RMDelegationTokenSecretManager rmDTSecretManager) { super(mock(RMContext.class), scheduler, mock(RMAppManager.class), new ApplicationACLsManager(conf), new QueueACLsManager(scheduler, conf), rmDTSecretManager); }
Example #14
Source File: TestClientRMService.java From big-c with Apache License 2.0 | 5 votes |
@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(); }
Example #15
Source File: ProtocolHATestBase.java From big-c with Apache License 2.0 | 5 votes |
public CustomedClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager) { super(rmContext, scheduler, rmAppManager, applicationACLsManager, queueACLsManager, rmDTSecretManager); }
Example #16
Source File: ClientRMService.java From hadoop with Apache License 2.0 | 5 votes |
public ClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager, Clock clock) { super(ClientRMService.class.getName()); this.scheduler = scheduler; this.rmContext = rmContext; this.rmAppManager = rmAppManager; this.applicationsACLsManager = applicationACLsManager; this.queueACLsManager = queueACLsManager; this.rmDTSecretManager = rmDTSecretManager; this.reservationSystem = rmContext.getReservationSystem(); this.clock = clock; this.rValidator = new ReservationInputValidator(clock); }
Example #17
Source File: ClientRMService.java From hadoop with Apache License 2.0 | 5 votes |
public ClientRMService(RMContext rmContext, YarnScheduler scheduler, RMAppManager rmAppManager, ApplicationACLsManager applicationACLsManager, QueueACLsManager queueACLsManager, RMDelegationTokenSecretManager rmDTSecretManager) { this(rmContext, scheduler, rmAppManager, applicationACLsManager, queueACLsManager, rmDTSecretManager, new UTCClock()); }
Example #18
Source File: RMActiveServiceContext.java From big-c with Apache License 2.0 | 4 votes |
@Private @Unstable public void setRMDelegationTokenSecretManager( RMDelegationTokenSecretManager delegationTokenSecretManager) { this.rmDelegationTokenSecretManager = delegationTokenSecretManager; }
Example #19
Source File: MockRMContext.java From incubator-myriad with Apache License 2.0 | 4 votes |
public void setDelegationTokenSecretManager(RMDelegationTokenSecretManager delegationTokenSecretManager) { this.delegationTokenSecretManager = delegationTokenSecretManager; }
Example #20
Source File: MockRMContext.java From incubator-myriad with Apache License 2.0 | 4 votes |
@Override public RMDelegationTokenSecretManager getRMDelegationTokenSecretManager() { return delegationTokenSecretManager; }
Example #21
Source File: MockRMContext.java From incubator-myriad with Apache License 2.0 | 4 votes |
@Override public void setRMDelegationTokenSecretManager(RMDelegationTokenSecretManager delegationTokenSecretManager) { this.delegationTokenSecretManager = delegationTokenSecretManager; }
Example #22
Source File: RMContextImpl.java From big-c with Apache License 2.0 | 4 votes |
@Override public void setRMDelegationTokenSecretManager( RMDelegationTokenSecretManager delegationTokenSecretManager) { activeServiceContext .setRMDelegationTokenSecretManager(delegationTokenSecretManager); }
Example #23
Source File: RMContextImpl.java From big-c with Apache License 2.0 | 4 votes |
@Override public RMDelegationTokenSecretManager getRMDelegationTokenSecretManager() { return activeServiceContext.getRMDelegationTokenSecretManager(); }
Example #24
Source File: RMContext.java From big-c with Apache License 2.0 | 4 votes |
void setRMDelegationTokenSecretManager( RMDelegationTokenSecretManager delegationTokenSecretManager);
Example #25
Source File: RMActiveServiceContext.java From big-c with Apache License 2.0 | 4 votes |
@Private @Unstable public RMDelegationTokenSecretManager getRMDelegationTokenSecretManager() { return this.rmDelegationTokenSecretManager; }
Example #26
Source File: RMContextImpl.java From hadoop with Apache License 2.0 | 4 votes |
@Override public void setRMDelegationTokenSecretManager( RMDelegationTokenSecretManager delegationTokenSecretManager) { activeServiceContext .setRMDelegationTokenSecretManager(delegationTokenSecretManager); }
Example #27
Source File: RMContextImpl.java From hadoop with Apache License 2.0 | 4 votes |
@Override public RMDelegationTokenSecretManager getRMDelegationTokenSecretManager() { return activeServiceContext.getRMDelegationTokenSecretManager(); }
Example #28
Source File: RMContext.java From hadoop with Apache License 2.0 | 4 votes |
void setRMDelegationTokenSecretManager( RMDelegationTokenSecretManager delegationTokenSecretManager);
Example #29
Source File: RMActiveServiceContext.java From hadoop with Apache License 2.0 | 4 votes |
@Private @Unstable public void setRMDelegationTokenSecretManager( RMDelegationTokenSecretManager delegationTokenSecretManager) { this.rmDelegationTokenSecretManager = delegationTokenSecretManager; }
Example #30
Source File: RMActiveServiceContext.java From hadoop with Apache License 2.0 | 4 votes |
@Private @Unstable public RMDelegationTokenSecretManager getRMDelegationTokenSecretManager() { return this.rmDelegationTokenSecretManager; }