Package com.cloudera.flume.conf.SourceFactory

Examples of com.cloudera.flume.conf.SourceFactory.SourceBuilder


    count = 0;
    rand.setSeed(seed);
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        int size = 150;
        long count = 0;
        if (argv.length > 2) {
View Full Code Here


    Socket client = sock.accept();
    is = new DataInputStream(client.getInputStream());
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        int port = SYSLOG_TCP_PORT; // default udp port, need root permissions
        // for this.
View Full Code Here

    svrthread = new ServerThread(port);
    svrthread.start();
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        int port = SYSLOG_TCP_PORT; // default udp port, need root permissions
        // for this.
View Full Code Here

            .getProperty("file.encoding"))));
    rd = new ConsoleReader(is, out);
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        return new JLineStdinSource();
      }
    };
View Full Code Here

      System.out.println(e);
    } while (true);
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        if (argv.length != 1) {
          throw new IllegalArgumentException("usage: seqfile(filename)");
View Full Code Here

      return e;
    }
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions
            .checkArgument(argv.length >= 1 && argv.length <= 4, USAGE);
View Full Code Here

    public Map<String, Reportable> getSubMetrics() {
      return ReportUtil.noChildren();
    }

    public static SourceBuilder builder() {
      return new SourceBuilder() {
        @Override
        public EventSource build(Context ctx, String... argv) {
          return new StubSource();
        }
      };
View Full Code Here

    /**
     * Bounded ranges on stubs sources.
     */
    public static SourceBuilder builder(final int minArgs, final int maxArgs) {
      return new SourceBuilder() {
        @Override
        public EventSource build(Context ctx, String... argv) {
          Preconditions.checkArgument(argv.length >= minArgs,
              "Too few arguments: expected at least " + minArgs
                  + " but only had " + argv.length);
View Full Code Here

          + e.getMessage(), e);
    }
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length == 1,
            "usage: thriftSource(port)");
View Full Code Here

      e1.printStackTrace();
    }
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {

      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length == 1, "usage: tsource(port)");
View Full Code Here

TOP

Related Classes of com.cloudera.flume.conf.SourceFactory.SourceBuilder

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.