Package com.cloudera.flume.core

Examples of com.cloudera.flume.core.EventSource


    out.write("#!/bin/bash\necho \"Hello world!\" >&2 \n"
        + "sleep 1s \necho \"Hello world!\" >&2 \n");
    out.close();
    String cmd = temp.getAbsolutePath();

    EventSource source = new ExecNioSource.Builder().build("/bin/bash " + cmd,
        "true");

    source.open();
    Event e = source.next();
    assertNotNull(e);
    assertEquals(26, e.getBody().length); // check that we read both lines
    source.close();

    // Check that the stdout reader closed correctly
    assertTrue(((ExecNioSource) source).readOut.signalDone.get());
  }
View Full Code Here


  public static final Logger LOG = LoggerFactory
      .getLogger(TestJLineStdinSource.class);

  @Test
  public void testCloseClose() throws IOException, InterruptedException {
    EventSource src = new JLineStdinSource();
    StandardSourceSinkHarnesses.testCloseClose(LOG, src);
  }
View Full Code Here

    StandardSourceSinkHarnesses.testCloseClose(LOG, src);
  }

  @Test
  public void testOpenOpen() throws IOException, InterruptedException {
    EventSource src = new JLineStdinSource();
    StandardSourceSinkHarnesses.testOpenOpen(LOG, src);
  }
View Full Code Here

    StandardSourceSinkHarnesses.testOpenOpen(LOG, src);
  }

  @Test
  public void testOpenClose() throws InterruptedException, IOException {
    EventSource src = new JLineStdinSource();
    StandardSourceSinkHarnesses.testSourceOpenClose(LOG, src);
  }
View Full Code Here

    StandardSourceSinkHarnesses.testSourceOpenClose(LOG, src);
  }

  @Test
  public void testConcurrentClose() throws InterruptedException, IOException {
    EventSource src = new JLineStdinSource();
    StandardSourceSinkHarnesses.testSourceConcurrentClose(LOG, src);
  }
View Full Code Here

  public static final Logger LOG = LoggerFactory
      .getLogger(TestStdinSource.class);

  @Test
  public void testCloseClose() throws IOException, InterruptedException {
    EventSource src = new StdinSource();
    StandardSourceSinkHarnesses.testCloseClose(LOG, src);
  }
View Full Code Here

    StandardSourceSinkHarnesses.testCloseClose(LOG, src);
  }

  @Test
  public void testOpenOpen() throws IOException, InterruptedException {
    EventSource src = new StdinSource();
    StandardSourceSinkHarnesses.testOpenOpen(LOG, src);
  }
View Full Code Here

    StandardSourceSinkHarnesses.testOpenOpen(LOG, src);
  }

  @Test
  public void testOpenClose() throws InterruptedException, IOException {
    EventSource src = new StdinSource();
    StandardSourceSinkHarnesses.testSourceOpenClose(LOG, src);
  }
View Full Code Here

   * This test is known to fail for this source.
   */
  @Ignore
  @Test
  public void testConcurrentClose() throws InterruptedException, IOException {
    EventSource src = new StdinSource();
    StandardSourceSinkHarnesses.testSourceConcurrentClose(LOG, src);
  }
View Full Code Here

    for (Map.Entry<String, EventSource> ent : sets.entrySet()) {
      setupLocalWriteDir();
      ReportManager.get().clear();

      // copy all events into memory
      EventSource src = MemorySinkSource.bufferize(ent.getValue());
      EventSink snk = createDecoratorBenchmarkSink(ent.getKey() + "," + deco,
          deco);
      src.open();
      snk.open();
      EventUtil.dumpAll(src, snk);
      src.close();
      snk.close();
      dumpReports();
      cleanupLocalWriteDir();
    }
  }
View Full Code Here

TOP

Related Classes of com.cloudera.flume.core.EventSource

Copyright © 2018 www.massapicom. 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.