Package com.cloudera.flume.conf.SinkFactory

Examples of com.cloudera.flume.conf.SinkFactory.SinkBuilder.build()


   * wrong # args, exception expected
   */
  @Test(expected = IllegalArgumentException.class)
  public void testBadArgsParseOkInstanceFail() {
    SinkBuilder sb = DFSEventSink.builder();
    sb.build(new Context());
  }

  /**
   * Failure occurs when opened due to permissions.
   */
 
View Full Code Here


  @Test
  public void testBadArgsOpenFail() throws IOException {
    assumeTrue(!OSUtils.isWindowsOS());

    SinkBuilder sb = DFSEventSink.builder();
    EventSink snk = sb.build(new Context(), "/foo/msgs");
    try {
      snk.open();
    } catch (IOException e) {
      return;
    }
View Full Code Here

   */
  @Test
  public void testFailoverBuilder() throws IOException {
    SinkBuilder bld = FailOverSink.builder();
    EventSink snk =
        bld.build(new ReportTestingContext(),
            "{intervalFlakeyAppend(2) => counter(\"pri\") } ",
            "counter(\"sec\")");
    snk.open();

    Event e = new EventImpl("foo".getBytes());
View Full Code Here

   */
  @Test
  public void testBackoffFailoverBuilder() throws IOException {
    SinkBuilder bld = BackOffFailOverSink.builder();
    EventSink snk =
        bld.build(new ReportTestingContext(),
            "{intervalFlakeyAppend(2) => counter(\"pri\") } ",
            "counter(\"sec\")");
    snk.open();

    Event e = new EventImpl("foo".getBytes());
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.