Examples of drain()


Examples of org.apache.avro.io.ResolvingDecoder.drain()

  @SuppressWarnings("unchecked")
  public D read(D reuse, Decoder in) throws IOException {
    ResolvingDecoder resolver = getResolver(actual, expected);
    resolver.configure(in);
    D result = (D) read(reuse, expected, resolver);
    resolver.drain();
    return result;
  }
 
  /** Called to read data.*/
  protected Object read(Object old, Schema expected,
View Full Code Here

Examples of org.apache.avro.io.ResolvingDecoder.drain()

  @SuppressWarnings("unchecked")
  public D read(D reuse, Decoder in) throws IOException {
    ResolvingDecoder resolver = getResolver(actual, expected);
    resolver.configure(in);
    D result = (D) read(reuse, expected, resolver);
    resolver.drain();
    return result;
  }
 
  /** Called to read data.*/
  protected Object read(Object old, Schema expected,
View Full Code Here

Examples of org.apache.avro.io.ResolvingDecoder.drain()

  @SuppressWarnings("unchecked")
  public D read(D reuse, Decoder in) throws IOException {
    ResolvingDecoder resolver = getResolver(actual, expected);
    resolver.configure(in);
    D result = (D) read(reuse, expected, resolver);
    resolver.drain();
    return result;
  }
 
  /** Called to read data.*/
  protected Object read(Object old, Schema expected,
View Full Code Here

Examples of org.apache.cassandra.tools.NodeProbe.drain()

      @Override
      public void run() {
        NodeProbe probe = clientProvider.getProbe(address);
        if (probe != null) {
          try {
            probe.drain();
          } catch (Exception e) {
            log.error("Failed to drain " + address, e);
          }
        }
      }
View Full Code Here

Examples of org.apache.geronimo.network.protocol.ProtocolFactory.drain()

            shutdownLatch.acquire();

            ssa.drain();

            pf.drain();

            sm.doStop();

            cp.doStop();
View Full Code Here

Examples of org.apache.geronimo.network.protocol.ServerSocketAcceptor.drain()

            throw new IllegalStateException("TIMEOUT");
        }

        clientStack.drain();

        ssa.drain();

        pf.drain();

        sm.doStop();
View Full Code Here

Examples of org.apache.geronimo.network.protocol.control.ControlClientProtocolStack.drain()

            clientStack.sendDown(getPlainPacket());
            clientStack.sendDown(getPlainPacket());

            Thread.sleep(5 * 1000);

            clientStack.drain();

            shutdownLatch.release();

            sm.doStop();

View Full Code Here

Examples of org.apache.kafka.clients.producer.internals.RecordAccumulator.drain()

        RecordAccumulator accum = new RecordAccumulator(1024, 10 * 1024, lingerMs, 100L, false, metrics, time);
        accum.append(tp1, key, value, CompressionType.NONE, null);
        assertEquals("No partitions should be ready", 0, accum.ready(cluster, time.milliseconds()).readyNodes.size());
        time.sleep(10);
        assertEquals("Our partition's leader should be ready", Collections.singleton(node1), accum.ready(cluster, time.milliseconds()).readyNodes);
        List<RecordBatch> batches = accum.drain(cluster, Collections.singleton(node1), Integer.MAX_VALUE, 0).get(node1.id());
        assertEquals(1, batches.size());
        RecordBatch batch = batches.get(0);
        Iterator<LogEntry> iter = batch.records.iterator();
        LogEntry entry = iter.next();
        assertEquals("Keys should match", ByteBuffer.wrap(key), entry.record().key());
View Full Code Here

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

    Configuration conf = new Configuration();
    conf.setBoolean(TezConfiguration.TEZ_AM_CONTAINER_REUSE_ENABLED, false);
    int interval = 100;
    conf.setInt(TezConfiguration.TEZ_AM_RM_HEARTBEAT_INTERVAL_MS_MAX, interval);
    scheduler.init(conf);
    drainableAppCallback.drain();
    verify(mockRMClient).init(conf);
    verify(mockRMClient).setHeartbeatInterval(interval);

    RegisterApplicationMasterResponse mockRegResponse =
                                mock(RegisterApplicationMasterResponse.class);
View Full Code Here

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

    when(mockRegResponse.getClientToAMTokenMasterKey()).thenReturn(mockKey);
    when(mockRMClient.
          registerApplicationMaster(anyString(), anyInt(), anyString())).
                                                   thenReturn(mockRegResponse);
    scheduler.start();
    drainableAppCallback.drain();
    verify(mockRMClient).start();
    verify(mockRMClient).registerApplicationMaster(appHost, appPort, appUrl);
    verify(mockApp).setApplicationRegistrationData(mockMaxResource,
                                                   mockAcls, mockKey);
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.