Examples of drain()


Examples of org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerAppCallbackDrainable.drain()

    ArgumentCaptor<CookieContainerRequest> requestCaptor =
                        ArgumentCaptor.forClass(CookieContainerRequest.class);
    // allocate task
    scheduler.allocateTask(mockTask1, mockCapability, hosts,
                           racks, mockPriority, null, mockCookie1);
    drainableAppCallback.drain();
    verify(mockRMClient, times(1)).
                           addContainerRequest((CookieContainerRequest) any());

    // returned from task requests before allocation happens
    assertFalse(scheduler.deallocateTask(mockTask1, true));
View Full Code Here

Examples of org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerAppCallbackDrainable.drain()

    Object mockCookie2 = mock(Object.class);
    Object mockTask3 = mock(Object.class);
    Object mockCookie3 = mock(Object.class);
    scheduler.allocateTask(mockTask1, mockCapability, hosts,
        racks, mockPriority, null, mockCookie1);
    drainableAppCallback.drain();
    verify(mockRMClient, times(2)).
                                addContainerRequest(requestCaptor.capture());
    CookieContainerRequest request1 = requestCaptor.getValue();
    scheduler.allocateTask(mockTask2, mockCapability, hosts,
        racks, mockPriority, null, mockCookie2);
View Full Code Here

Examples of org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerAppCallbackDrainable.drain()

    verify(mockRMClient, times(2)).
                                addContainerRequest(requestCaptor.capture());
    CookieContainerRequest request1 = requestCaptor.getValue();
    scheduler.allocateTask(mockTask2, mockCapability, hosts,
        racks, mockPriority, null, mockCookie2);
    drainableAppCallback.drain();
    verify(mockRMClient, times(3)).
                                addContainerRequest(requestCaptor.capture());
    CookieContainerRequest request2 = requestCaptor.getValue();
    scheduler.allocateTask(mockTask3, mockCapability, hosts,
        racks, mockPriority, null, mockCookie3);
View Full Code Here

Examples of org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerAppCallbackDrainable.drain()

    verify(mockRMClient, times(3)).
                                addContainerRequest(requestCaptor.capture());
    CookieContainerRequest request2 = requestCaptor.getValue();
    scheduler.allocateTask(mockTask3, mockCapability, hosts,
        racks, mockPriority, null, mockCookie3);
    drainableAppCallback.drain();
    verify(mockRMClient, times(4)).
                                addContainerRequest(requestCaptor.capture());
    CookieContainerRequest request3 = requestCaptor.getValue();

    List<Container> containers = new ArrayList<Container>();
View Full Code Here

Examples of org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerAppCallbackDrainable.drain()

            return emptyList;
          }

        });
    scheduler.onContainersAllocated(containers);
    drainableAppCallback.drain();
    // first container allocated
    verify(mockApp).taskAllocated(mockTask1, mockCookie1, mockContainer1);
    verify(mockApp).taskAllocated(mockTask2, mockCookie2, mockContainer2);
    verify(mockApp).taskAllocated(mockTask3, mockCookie3, mockContainer3);
    // no other allocations returned
View Full Code Here

Examples of org.apache.tez.dag.app.rm.TestTaskSchedulerHelpers.TaskSchedulerAppCallbackDrainable.drain()

    // verify unwanted container released
    verify(mockRMClient).releaseAssignedContainer(mockCId4);

    // deallocate allocated task
    assertTrue(scheduler.deallocateTask(mockTask1, true));
    drainableAppCallback.drain();
    verify(mockApp).containerBeingReleased(mockCId1);
    verify(mockRMClient).releaseAssignedContainer(mockCId1);
    // deallocate allocated container
    Assert.assertEquals(mockTask2, scheduler.deallocateContainer(mockCId2));
    drainableAppCallback.drain();
View Full Code Here

Examples of org.bouncycastle.cms.CMSTypedStream.drain()

        final CMSSignedDataParser sp = new CMSSignedDataParser(bis);
        final CMSTypedStream sc = sp.getSignedContent();
        final InputStream ris = sc.getContentStream();
        fromInToOut(ris, bos);
        os.close();
        sc.drain();
        final Iterator  it = sp.getSignerInfos().getSigners().iterator();
        if ( !it.hasNext() ) {
            return null;
        }
        final SignerInformation signerInfo = (SignerInformation)it.next();
View Full Code Here

Examples of org.bouncycastle.cms.CMSTypedStream.drain()

    InputStream inputStream = new ByteArrayInputStream(data);
    DigestCalculatorProvider digestCalculatorProvider = new BcDigestCalculatorProvider();
    CMSSignedDataParser signedDataParser = new CMSSignedDataParser(digestCalculatorProvider, new CMSTypedStream(inputStream), signature);
    CMSTypedStream signedContent = signedDataParser.getSignedContent();

    signedContent.drain();

    CollectionStore certificatesStore = (CollectionStore) signedDataParser.getCertificates();

    boolean verified = true;
View Full Code Here

Examples of org.infinispan.distribution.TransactionLogger.drain()

      throw new CacheException("Unknown rehash control command type " + type);
   }

   private RemoteTransactionLogDetails drainTxLog() {
      TransactionLogger tl = distributionManager.getTransactionLogger();
      List<WriteCommand> mods = tl.drain();
      return new RemoteTransactionLogDetails(tl.shouldDrainWithoutLock(), mods, null);
   }

   private RemoteTransactionLogDetails lockAndDrainTxLog() {
      TransactionLogger tl = distributionManager.getTransactionLogger();
View Full Code Here

Examples of org.jboss.example.jms.stateless.bean.StatelessSessionExample.drain()

      StatelessSessionExample bean = home.create();
                 
      String queueName = getDestinationJNDIName();
      String text = "Hello!";                 
     
      bean.drain(queueName);
                      
      bean.send("Hello!", queueName);
      log("The " + text + " message was successfully sent to the " + queueName + " queue");
         
      int num = bean.browse(queueName);
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.