Package com.cloudera.flume.core

Examples of com.cloudera.flume.core.CompositeSink.open()


    LOG.info(agent2);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 1\",\"collector 4\",\"collector 5\")",
        agent2);
    CompositeSink snk2 = new CompositeSink(new Context(), agent2);
    snk2.open();
    snk2.close();

    String agent3 = am.getFailChainSinkSpec("agent3",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent3);
View Full Code Here


    LOG.info(agent3);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 1\",\"collector 2\",\"collector 5\")",
        agent3);
    CompositeSink snk3 = new CompositeSink(new Context(), agent3);
    snk3.open();
    snk3.close();

  }

  /**
 
View Full Code Here

    LOG.info(agent1);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 5\",\"collector 1\",\"collector 3\")",
        agent1);
    CompositeSink snk1 = new CompositeSink(new Context(), agent1);
    snk1.open();
    snk1.close();

    String agent2 = am.getFailChainSinkSpec("agent2",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent2);
View Full Code Here

    LOG.info(agent2);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 2\",\"collector 1\",\"collector 3\")",
        agent2);
    CompositeSink snk2 = new CompositeSink(new Context(), agent2);
    snk2.open();
    snk2.close();

    String agent3 = am.getFailChainSinkSpec("agent3",
        "{lazyOpen => counter(\"%s\")}");
    LOG.info(agent3);
View Full Code Here

    LOG.info(agent3);
    assertEquals(
        "failChain(\"{lazyOpen => counter(\\\"%s\\\")}\",\"collector 5\",\"collector 1\",\"collector 2\")",
        agent3);
    CompositeSink snk3 = new CompositeSink(new Context(), agent3);
    snk3.open();
    snk3.close();

  }

}
View Full Code Here

  public void testRollRollConflict() throws IOException, FlumeSpecException,
      InterruptedException {
    EventSink snk = new CompositeSink(new Context(),
        "{value(\"rolltag\",\"foofoo\") =>   roll(10000) {null} } ");
    Event e = new EventImpl("foo".getBytes());
    snk.open();
    snk.append(e); // should bork.
  }

  @Test(expected = IllegalArgumentException.class)
  public void testRollRollBork() throws IOException, FlumeSpecException, InterruptedException {
View Full Code Here

  @Test(expected = IllegalArgumentException.class)
  public void testRollRollBork() throws IOException, FlumeSpecException, InterruptedException {
    EventSink snk = new CompositeSink(new Context(),
        "roll(10000) { roll(10000) { null } } ");
    Event e = new EventImpl("foo".getBytes());
    snk.open();
    snk.append(e); // should bork.
  }

  @Test
  public void testRollRollNoConflict() throws IOException, FlumeSpecException, InterruptedException {
View Full Code Here

    EventSink snk = new CompositeSink(new Context(),
        "{value(\"rolltag\",\"foofoo\") =>  "
            + "{ mask(\"rolltag\")=>  roll(10000) { null}}} ");

    Event e = new EventImpl("foo".getBytes());
    snk.open();
    snk.append(e); // should not bork.
  }

  @Test
  public void testRollRollNoBork() throws IOException, FlumeSpecException, InterruptedException {
View Full Code Here

  @Test
  public void testRollRollNoBork() throws IOException, FlumeSpecException, InterruptedException {
    EventSink snk = new CompositeSink(new Context(),
        "roll(10000) {{ mask(\"rolltag\") => roll(10000) {null} }} ");
    Event e = new EventImpl("foo".getBytes());
    snk.open();
    snk.append(e); // should not bork.
  }

  // This used to trigger an exception but now that the rolltag is suppressed it
  // should no longer.
View Full Code Here

    EventSink snk = new CompositeSink(LogicalNodeContext.testingContext(),
        "{ ackedWriteAhead => roll(1000) { dfs(\"file:///"
            + StringEscapeUtils.escapeJava(path.getAbsolutePath()) + "\") } }");
    Event e = new EventImpl("foo".getBytes());
    snk.open();
    snk.append(e); // should not bork.
    snk.close();
    BenchmarkHarness.cleanupLocalWriteDir();
  }
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.