Examples of RMContext


Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

  @Before
  public void setUp() {
    Configuration conf = new Configuration();
    // Dispatcher that processes events inline
    Dispatcher dispatcher = new InlineDispatcher();
    RMContext context = new RMContextImpl(dispatcher, null,
        null, null, null, null, null, null, null, null);
    dispatcher.register(SchedulerEventType.class,
        new InlineDispatcher.EmptyEventHandler());
    dispatcher.register(RMNodeEventType.class,
        new NodeEventDispatcher(context));
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

    UserGroupInformation.setConfiguration(conf);
    eventQueue = new LinkedBlockingQueue<Event>();
    dispatcher = new AsyncDispatcher(eventQueue);
    Renewer.reset();
    delegationTokenRenewer = createNewDelegationTokenRenewer(conf, counter);
    RMContext mockContext = mock(RMContext.class);
    ClientRMService mockClientRMService = mock(ClientRMService.class);
    when(mockContext.getDelegationTokenRenewer()).thenReturn(
        delegationTokenRenewer);
    when(mockContext.getDispatcher()).thenReturn(dispatcher);
    when(mockContext.getClientRMService()).thenReturn(mockClientRMService);
    InetSocketAddress sockAddr =
        InetSocketAddress.createUnresolved("localhost", 1234);
    when(mockClientRMService.getBindAddress()).thenReturn(sockAddr);
    delegationTokenRenewer.setRMContext(mockContext);
    delegationTokenRenewer.init(conf);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

    lconf.setLong(
        YarnConfiguration.RM_DELAYED_DELEGATION_TOKEN_REMOVAL_INTERVAL_MS,
        1000l);
    DelegationTokenRenewer localDtr =
        createNewDelegationTokenRenewer(lconf, counter);
    RMContext mockContext = mock(RMContext.class);
    ClientRMService mockClientRMService = mock(ClientRMService.class);
    when(mockContext.getClientRMService()).thenReturn(mockClientRMService);
    when(mockContext.getDelegationTokenRenewer()).thenReturn(
        localDtr);
    when(mockContext.getDispatcher()).thenReturn(dispatcher);
    InetSocketAddress sockAddr =
        InetSocketAddress.createUnresolved("localhost", 1234);
    when(mockClientRMService.getBindAddress()).thenReturn(sockAddr);
    localDtr.setRMContext(mockContext);
    localDtr.init(lconf);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

    lconf.setLong(
        YarnConfiguration.RM_DELAYED_DELEGATION_TOKEN_REMOVAL_INTERVAL_MS,
        1000l);
    DelegationTokenRenewer localDtr =
        createNewDelegationTokenRenewer(conf, counter);
    RMContext mockContext = mock(RMContext.class);
    ClientRMService mockClientRMService = mock(ClientRMService.class);
    when(mockContext.getClientRMService()).thenReturn(mockClientRMService);
    when(mockContext.getDelegationTokenRenewer()).thenReturn(
        localDtr);
    when(mockContext.getDispatcher()).thenReturn(dispatcher);
    InetSocketAddress sockAddr =
        InetSocketAddress.createUnresolved("localhost", 1234);
    when(mockClientRMService.getBindAddress()).thenReturn(sockAddr);
    localDtr.setRMContext(mockContext);
    localDtr.init(lconf);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

    doReturn(Long.MAX_VALUE).when(token2).renew(any(Configuration.class));    
                                                                              
    // fire up the renewer                                                    
    final DelegationTokenRenewer dtr =
        createNewDelegationTokenRenewer(conf, counter);          
    RMContext mockContext = mock(RMContext.class);                            
    ClientRMService mockClientRMService = mock(ClientRMService.class);        
    when(mockContext.getClientRMService()).thenReturn(mockClientRMService);   
    InetSocketAddress sockAddr =                                              
        InetSocketAddress.createUnresolved("localhost", 1234);                
    when(mockClientRMService.getBindAddress()).thenReturn(sockAddr);          
    dtr.setRMContext(mockContext)
    when(mockContext.getDelegationTokenRenewer()).thenReturn(dtr);
    dtr.init(conf);
    dtr.start();                                                                          
    // submit a job that blocks during renewal                                
    Thread submitThread = new Thread() {                                      
      @Override                                                               
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

 
  @Test(timeout=5000)
  public void testAppAttemptMetrics() throws Exception {
    AsyncDispatcher dispatcher = new InlineDispatcher();
    RMApplicationHistoryWriter writer = mock(RMApplicationHistoryWriter.class);
    RMContext rmContext = new RMContextImpl(dispatcher, null,
        null, null, null, null, null, null, null, writer);

    FifoScheduler scheduler = new FifoScheduler();
    Configuration conf = new Configuration();
    scheduler.setRMContext(rmContext);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

    containerTokenSecretManager.rollMasterKey();
    NMTokenSecretManagerInRM nmTokenSecretManager =
        new NMTokenSecretManagerInRM(conf);
    nmTokenSecretManager.rollMasterKey();
    RMApplicationHistoryWriter writer = mock(RMApplicationHistoryWriter.class);
    RMContext rmContext = new RMContextImpl(dispatcher, null, null, null, null,
        null, containerTokenSecretManager, nmTokenSecretManager, null, writer);

    FifoScheduler scheduler = new FifoScheduler();
    scheduler.setRMContext(rmContext);
    scheduler.init(conf);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

    containerTokenSecretManager.rollMasterKey();
    NMTokenSecretManagerInRM nmTokenSecretManager =
        new NMTokenSecretManagerInRM(conf);
    nmTokenSecretManager.rollMasterKey();
    RMApplicationHistoryWriter writer = mock(RMApplicationHistoryWriter.class);
    RMContext rmContext = new RMContextImpl(dispatcher, null, null, null, null,
        null, containerTokenSecretManager, nmTokenSecretManager, null, writer);

    FifoScheduler scheduler = new FifoScheduler(){
      @SuppressWarnings("unused")
      public Map<NodeId, FiCaSchedulerNode> getNodes(){
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

  @Before
  public void setUp() {
    Configuration conf = new Configuration();
    // Dispatcher that processes events inline
    Dispatcher dispatcher = new InlineDispatcher();
    RMContext context = new RMContextImpl(new MemStore(), dispatcher, null,
        null, null, null, null, null);
    dispatcher.register(SchedulerEventType.class,
        new InlineDispatcher.EmptyEventHandler());
    dispatcher.register(RMNodeEventType.class,
        new NodeEventDispatcher(context));
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContext

  }
 
  @Test
  public void testAppAttemptMetrics() throws Exception {
    AsyncDispatcher dispatcher = new InlineDispatcher();
    RMContext rmContext = new RMContextImpl(null, dispatcher, null,
        null, null, null, null, null);

    FifoScheduler schedular = new FifoScheduler();
    schedular.reinitialize(new Configuration(), rmContext);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.