Package com.cloudera.flume.conf.SinkFactory

Examples of com.cloudera.flume.conf.SinkFactory.SinkBuilder.create()


    conf.set(FlumeConfiguration.COLLECTOR_DFS_COMPRESS_CODEC, codecName);

    // build a sink that outputs to that format.
    File f = FileUtil.mktempdir();
    SinkBuilder builder = EscapedCustomDfsSink.builder();
    EventSink snk = builder.create(new Context(), "file:///" + f.getPath()
        + "/sub-%{service}");
    Event e = new EventImpl("this is a test message".getBytes());
    Attributes.setString(e, "service", "foo");
    snk.open();
    snk.append(e);
View Full Code Here


          } else {
            Pair<String, CommonTree> kwarg = buildKWArg(tr);
            ctx.putObj(kwarg.getLeft(), buildSimpleArg(kwarg.getRight()));
          }
        }
        return rollBuilder.create(ctx, args.toArray());
      } catch (IllegalArgumentException iae) {
        throw new FlumeSpecException(iae.getMessage());
      }
    }
View Full Code Here

        // TODO replace with Generator Sink lookup
        Preconditions.checkArgument("collector".equals(sourceType));
        SinkBuilder builder = CollectorSink.builder();

        return builder.create(ctx, args.toArray());

      } catch (IllegalArgumentException iae) {
        throw new FlumeSpecException(iae.getMessage());
      }
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.