Package com.cloudera.flume.conf

Examples of com.cloudera.flume.conf.Context


    ReorderDecorator.builder().build(new Context(), "2.0", "0.0");
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBadBuilder3() {
    ReorderDecorator.builder().build(new Context(), "0.0", "-1.0");
  }
View Full Code Here


    ReorderDecorator.builder().build(new Context(), "0.0", "-1.0");
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBadBuilder4() {
    ReorderDecorator.builder().build(new Context(), "0.0", "2.0");
  }
View Full Code Here

    LOG.info("filename before escaping: " + f.getAbsolutePath());
    String custom = "text(\""
        + StringEscapeUtils.escapeJava(f.getAbsolutePath())
        + "\", \"avrodata\")";
    LOG.info("sink to parse: " + custom);
    EventSink snk = FlumeBuilder.buildSink(new Context(), custom);
    snk.open();
    mem.open();
    EventUtil.dumpAll(mem, snk);
    snk.close();
View Full Code Here

  /**
   * Make sure the builder works.
   */
  @Test
  public void testAckInjectorBuilderArgs() throws FlumeSpecException {
    FlumeBuilder.buildSink(new Context(), "{ ackInjector => null}");
  }
View Full Code Here

  /**
   * Throw error when builder encounters too many args.
   */
  @Test(expected = FlumeSpecException.class)
  public void testAckInjectorBuilderBadArgs() throws FlumeSpecException {
    FlumeBuilder.buildSink(new Context(), "{ ackInjector(false) => null}");
  }
View Full Code Here

    FlumeBuilder.buildSink(new Context(), "{ ackInjector(false) => null}");
  }

  @Test
  public void testAckCheckerBuilderArgs() throws FlumeSpecException {
    FlumeBuilder.buildSink(new Context(), "{ackChecker => null}");
  }
View Full Code Here

    FlumeBuilder.buildSink(new Context(), "{ackChecker => null}");
  }

  @Test(expected = FlumeSpecException.class)
  public void testAckCheckerBuilderBadArgs() throws FlumeSpecException {
    FlumeBuilder.buildSink(new Context(), "{ackChecker(false) => null}");
  }
View Full Code Here

    return agent;
  }

  LogicalNode setupColl(long port, String name, String acc) throws IOException,
      RuntimeException, FlumeSpecException {
    Context ctx = new LogicalNodeContext(new ReportTestingContext(), "phys",
        name);
    LogicalNode coll = new LogicalNode(ctx, name);
    FlumeConfigData fcd2 = new FlumeConfigData(0, "rpcSource(" + port + ")",
        "accumulator(\"" + acc + "\")", 1, 1, "flow");
    coll.loadConfig(fcd2);
View Full Code Here

   * Give a logical node name, and src and a sink spec, generate a new logical
   * node.
   */
  synchronized public void spawn(String name, String src, String snk)
      throws IOException, FlumeSpecException {
    Context ctx = new LogicalNodeContext(physicalNode, name);
    spawn(ctx, name, FlumeBuilder.buildSource(ctx, src), new CompositeSink(ctx,
        snk));
  }
View Full Code Here

   */
  synchronized public void testingSpawn(String name, String src, String snk)
      throws IOException, FlumeSpecException {
    LogicalNode nd = threads.get(name);
    if (nd == null) {
      Context ctx = new ReportTestingContext(new LogicalNodeContext(
          physicalNode, name));

      LOG.info("creating new logical node " + name);
      nd = new LogicalNode(ctx, name);
      threads.put(nd.getName(), nd);
View Full Code Here

TOP

Related Classes of com.cloudera.flume.conf.Context

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.