Package com.cloudera.flume.conf

Examples of com.cloudera.flume.conf.SinkFactoryImpl


      @Override
      public EventSink build(Context context, String... argv) {
        return snk;
      }
    };
    SinkFactoryImpl sf = new SinkFactoryImpl();
    sf.setSink("rte", sb);
    FlumeBuilder.setSinkFactory(sf);

    final EventSink coll = FlumeBuilder.buildSink(
        LogicalNodeContext.testingContext(), "collector(5000) { rte }");
    coll.open();
View Full Code Here


      @Override
      public EventSink build(Context context, String... argv) {
        return snk;
      }
    };
    SinkFactoryImpl sf = new SinkFactoryImpl();
    sf.setSink("closeRte", sb);
    FlumeBuilder.setSinkFactory(sf);

    final EventSink coll = FlumeBuilder.buildSink(
        LogicalNodeContext.testingContext(), "collector(5000) { closeRte }");
    coll.open();
View Full Code Here

      @Override
      public EventSink build(Context context, String... argv) {
        return snk;
      }
    };
    SinkFactoryImpl sf = new SinkFactoryImpl();
    sf.setSink("appendError", sb);
    FlumeBuilder.setSinkFactory(sf);

    final EventSink coll = FlumeBuilder.buildSink(
        LogicalNodeContext.testingContext(), "collector(5000) { appendError}");
    coll.open();
View Full Code Here

  }

  @Test
  public void testFailOpenSink() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SinkFactoryImpl snkfact = new SinkFactoryImpl();
    snkfact.setSink("failOpen", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return new EventSink.Base() {
          @Override
          public void open() throws IOException {
View Full Code Here

  }

  @Test
  public void testFailAppendSink() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SinkFactoryImpl snkfact = new SinkFactoryImpl();
    snkfact.setSink("failAppend", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return new EventSink.Base() {
          @Override
          public void append(Event e) throws IOException {
View Full Code Here

  }

  @Test
  public void testFailCloseSink() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SinkFactoryImpl snkfact = new SinkFactoryImpl();
    snkfact.setSink("failClose", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return new EventSink.Base() {
          @Override
          public void open() throws IOException {
View Full Code Here

    final Event e1 = new EventImpl("foo1".getBytes());
    final Event e2 = new EventImpl("foo2".getBytes());
    doThrow(new IOException()).when(mock).append(e1);
    doThrow(new IOException()).when(mock).append(e2);

    SinkFactoryImpl sfi = new SinkFactoryImpl();
    sfi.setSink("rollLock", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return mock;
      }
    });
View Full Code Here

  }

  @Test
  public void testFailOpenSink() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SinkFactoryImpl snkfact = new SinkFactoryImpl();
    snkfact.setSink("failOpen", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return new EventSink.Base() {
          @Override
          public void open() throws IOException {
View Full Code Here

  }

  @Test
  public void testFailAppendSink() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SinkFactoryImpl snkfact = new SinkFactoryImpl();
    snkfact.setSink("failAppend", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return new EventSink.Base() {
          @Override
          public void append(Event e) throws IOException {
View Full Code Here

  }

  @Test
  public void testFailCloseSink() throws IOException, RuntimeException,
      FlumeSpecException, InterruptedException {
    SinkFactoryImpl snkfact = new SinkFactoryImpl();
    snkfact.setSink("failClose", new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... argv) {
        return new EventSink.Base() {
          @Override
          public void open() throws IOException {
View Full Code Here

TOP

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

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.