Package com.cloudera.flume.conf.SinkFactory

Examples of com.cloudera.flume.conf.SinkFactory.SinkDecoBuilder


      getSink().append(e);
    }
  }

  public static SinkDecoBuilder builder() {
    return new SinkDecoBuilder() {
      @Override
      public EventSinkDecorator<EventSink> build(Context context,
          String... argv) {
        Preconditions.checkArgument(argv.length == 1 || argv.length == 2,
            "usage: proabilitySampler(prob[, seed])");
View Full Code Here


    sampler.onNext(v);
  }

  public static SinkDecoBuilder builder() {

    return new SinkDecoBuilder() {
      @Override
      public EventSinkDecorator<EventSink> build(Context context,
          String... argv) {
        Preconditions.checkArgument(argv.length == 1,
            "usage: reservoirSampler(sample)");
View Full Code Here

    }
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBadE2eBuilderArgs() {
    SinkDecoBuilder b = NaiveFileWALDeco.builderEndToEndDir();
    b.build(new Context(), "foo", "bar");
  }
View Full Code Here

    assertFalse(b2.contains(b1));
  }

  @Test
  public void testBloomGenBuilders() {
    SinkDecoBuilder b = BloomGeneratorDeco.builder();
    Context ctx = new Context();
    b.build(ctx, "2234", "123");
    b.build(ctx, "1234");
    b.build(ctx);
  }
View Full Code Here

    b.build(ctx);
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBloomGenBuilderFail() {
    SinkDecoBuilder b = BloomGeneratorDeco.builder();
    b.build(new Context(), "2234", "123", "r3414");
  }
View Full Code Here

    b.build(new Context(), "2234", "123", "r3414");
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBloomGenBuilderFail2() {
    SinkDecoBuilder b = BloomGeneratorDeco.builder();
    b.build(new Context(), "r3414");
  }
View Full Code Here

    b.build(new Context(), "r3414");
  }

  @Test
  public void testBloomCheckBuilders() {
    SinkDecoBuilder b = BloomGeneratorDeco.builder();
    Context ctx = new Context();
    b.build(ctx, "2234", "123");
    b.build(ctx, "1234");
    b.build(ctx);
  }
View Full Code Here

    b.build(ctx);
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBloomCheckBuilderFail() {
    SinkDecoBuilder b = BloomGeneratorDeco.builder();
    b.build(new Context(), "2234", "123", "r3414");
  }
View Full Code Here

    b.build(new Context(), "2234", "123", "r3414");
  }

  @Test(expected = IllegalArgumentException.class)
  public void testBloomCheckBuilderFail2() {
    SinkDecoBuilder b = BloomGeneratorDeco.builder();
    b.build(new Context(), "r3414");
  }
View Full Code Here

    Attributes.setString(e, attr, val);
    super.append(e);
  }

  public static SinkDecoBuilder builder() {
    return new SinkDecoBuilder() {
      @Override
      public EventSinkDecorator<EventSink> build(Context context,
          String... argv) {
        Preconditions.checkArgument(argv.length == 3,
            "usage: regex(regex, idx, dstAttr)");
View Full Code Here

TOP

Related Classes of com.cloudera.flume.conf.SinkFactory.SinkDecoBuilder

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.