Package com.cloudera.flume.core

Examples of com.cloudera.flume.core.EventSinkDecorator


      CommonTree t) throws FlumeSpecException {
    Context ctx = new Context(context);
    Pair<String, List<String>> idArgs = handleArgs(t, ctx);
    String sinkType = idArgs.getLeft();
    List<String> args = idArgs.getRight();
    EventSinkDecorator deco = sinkFactory.getDecorator(ctx, sinkType, args
        .toArray(new String[0]));
    if (deco == null) {
      throw new FlumeIdException("Invalid sink decorator: "
          + FlumeSpecGen.genEventSinkDecorator(t));
    }
View Full Code Here


    CollectorSink coll = (CollectorSink) FlumeBuilder.buildSink(new Context(),
        snkspec);
    AckChecksumChecker<EventSink> chk = (AckChecksumChecker<EventSink>) coll
        .getSink();
    // insistent append
    EventSinkDecorator deco = (EventSinkDecorator<EventSink>) chk.getSink();
    // -> stubborn append
    deco = (EventSinkDecorator<EventSink>) deco.getSink();

    // stubborn append -> insistent
    deco = (EventSinkDecorator<EventSink>) deco.getSink();

    // insistent append -> mask
    deco = (EventSinkDecorator<EventSink>) deco.getSink();

    RollSink roll = (RollSink) deco.getSink();

    // normally inside wal
    NaiveFileWALDeco.AckChecksumRegisterer<EventSink> snk = new NaiveFileWALDeco.AckChecksumRegisterer(
        coll, node.getAckChecker().getAgentAckQueuer());
    return new Pair<RollSink, EventSink>(roll, snk);
View Full Code Here

    String sinkType = children.remove(0).getText();
    List<String> args = new ArrayList<String>();
    for (CommonTree tr : children) {
      args.add(buildArg(tr));
    }
    EventSinkDecorator deco = sinkFactory.getDecorator(context, sinkType, args
        .toArray(new String[0]));
    if (deco == null) {
      throw new FlumeIdException("Invalid sink decorator: "
          + FlumeSpecGen.genEventSinkDecorator(t));
    }
View Full Code Here

    this.walman = walman;
    this.trigger = t;
    this.queuer = new AckListener.Empty();
    this.al = al;
    // TODO get rid of this cast.
    this.drainSink = (EventSinkDecorator<S>) new EventSinkDecorator(
        new LazyOpenDecorator(new AckChecksumRegisterer<S>(s, al)));
    this.checkMs = checkMs;
  }
View Full Code Here

TOP

Related Classes of com.cloudera.flume.core.EventSinkDecorator

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.