Examples of ResettableInputStream


Examples of org.apache.flume.serialization.ResettableInputStream

    validateMiniParse(des);
  }

  @Test
  public void testBatch() throws IOException {
    ResettableInputStream in = new ResettableTestStringInputStream(mini);
    EventDeserializer des = new BlobDeserializer(new Context(), in);
    List<Event> events;

    events = des.readEvents(10); // try to read more than we should have
    assertEquals(1, events.size());
View Full Code Here

Examples of org.apache.flume.serialization.ResettableInputStream

  public void testMaxLineLength() throws IOException {
    String longLine = "abcdefghijklmnopqrstuvwxyz\n";
    Context ctx = new Context();
    ctx.put(BlobDeserializer.MAX_BLOB_LENGTH_KEY, "10");

    ResettableInputStream in = new ResettableTestStringInputStream(longLine);
    EventDeserializer des = new BlobDeserializer(ctx, in);

    assertEventBodyEquals("abcdefghij", des.readEvent());
    assertEventBodyEquals("klmnopqrst", des.readEvent());
    assertEventBodyEquals("uvwxyz\n", des.readEvent());
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.