Package com.cloudera.flume.handlers.debug

Examples of com.cloudera.flume.handlers.debug.NoNlASCIISynthSource.open()


   * @throws InterruptedException
   */
  @Test
  public void testThriftSend() throws IOException, InterruptedException {
    EventSource txt = new NoNlASCIISynthSource(25, 100);
    txt.open();
    MemorySinkSource mem = new MemorySinkSource();
    mem.open();
    EventUtil.dumpAll(txt, mem);
    txt.close();

View Full Code Here


   *
   */
  @Test
  public void testThriftRawSend() throws IOException, InterruptedException {
    EventSource txt = new NoNlASCIISynthSource(25, 100);
    txt.open();
    MemorySinkSource mem = new MemorySinkSource();
    mem.open();
    EventUtil.dumpAll(txt, mem);
    txt.close();

View Full Code Here

          try {
            // TODO (jon) this may have different sizes due to the host it is
            // running on . Needs to be fixed.
            EventSource txt = new NoNlASCIISynthSource(25, 100);

            txt.open();
            MemorySinkSource mem = new MemorySinkSource();
            mem.open();
            EventUtil.dumpAll(txt, mem);
            txt.close();
View Full Code Here

   * @throws InterruptedException
   */
  @Test
  public void testAvroSend() throws IOException, InterruptedException {
    EventSource txt = new NoNlASCIISynthSource(25, 100);
    txt.open();
    MemorySinkSource mem = new MemorySinkSource();
    mem.open();
    EventUtil.dumpAll(txt, mem);
    txt.close();

View Full Code Here

      final int id = i;
      Thread th = new Thread() {
        public void run() {
          try {
            EventSource txt = new NoNlASCIISynthSource(25, 100);
            txt.open();
            MemorySinkSource mem = new MemorySinkSource();
            mem.open();
            EventUtil.dumpAll(txt, mem);
            txt.close();
View Full Code Here

public class TestHadoopLogData implements ExampleData {

  @Test
  public void testLineCount() throws IOException, InterruptedException {
    EventSource src = new NoNlASCIISynthSource(25, 100, 1);
    src.open();

    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(
        HADOOP_REGEXES);
    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
View Full Code Here

      // setup a source of data that will shove a lot of ack laden data into the
      // stream.
      MemorySinkSource mem = new MemorySinkSource();
      EventSource src = new NoNlASCIISynthSource(COUNT, 10);
      src.open();
      Event e;
      while ((e = src.next()) != null) {
        AckChecksumInjector<EventSink> acks = new AckChecksumInjector<EventSink>(
            mem);
        acks.open(); // memory in sink never resets, and just keeps appending
View Full Code Here

    MultiGrepReporterSink<String> snk = new MultiGrepReporterSink<String>(
        "multi grep", aho);
    snk.open();

    EventSource src = new NoNlASCIISynthSource(25, 100, 1);
    src.open();

    EventUtil.dumpAll(src, snk);

    snk.append(new EventImpl(NPE.getBytes()));
    snk.append(new EventImpl(LOST.getBytes()));
View Full Code Here

    MultiGrepReporterSink<String> snk = c.iterator().next();
    snk.open();

    EventSource src = new NoNlASCIISynthSource(25, 100, 1);

    src.open();

    EventUtil.dumpAll(src, snk);
    snk.append(new EventImpl(NPE.getBytes()));
    snk.append(new EventImpl(LOST.getBytes()));
    snk.append(new EventImpl(LOST.getBytes()));
View Full Code Here

            ReportManager.get().add(cnt1);
            // make each parallel instance send a slightly different number of
            // messages.
            EventSource src = new NoNlASCIISynthSource(events + idx, 100);

            src.open();
            snk.open();

            started.countDown();

            EventUtil.dumpAll(src, snk);
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.