Package com.cloudera.flume.conf.SourceFactory

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


      e1.printStackTrace();
    }
  }

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

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


    this.in = new BufferedReader(new FileReader(fname));
    LOG.info("File " + fname + " opened");
  }

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

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

  public int getPort() {
    return port;
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(String... argv) {
        // accept 0 or 1 argument.
        Preconditions.checkArgument(argv.length <= 1,
            "usage: collectorSource[(port={"
View Full Code Here

  /**
   * This class will build an AvroEventSource or ThriftEventSource depending on
   * the value of EVENT_RPC_TYPE set in the configuration file.
   */
  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(String... argv) {
        Preconditions.checkArgument(argv.length == 1, "usage: rpcSource(port)");

        int port = Integer.parseInt(argv[0]);
View Full Code Here

    }
    rd = new BufferedReader(new InputStreamReader(System.in));
  }

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

    // This is unreachable.
    return null;
  }

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(String... argv) {
        if (argv.length != 1) {
          throw new IllegalArgumentException("usage: log4jfile(filename) ");
        }
View Full Code Here

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

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(String... argv) {
        if (argv.length < 4 || argv.length > 5) {
          throw new IllegalArgumentException(
              "usage: attrsynth(count, attrs, attrSz, valSz[,rseed=curtime]) // count=0 infinite");
View Full Code Here

    public ReportEvent getReport() {
      return new ReportEvent(getName());
    }

    public static SourceBuilder builder() {
      return new SourceBuilder() {
        @Override
        public EventSource build(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(String... argv) {
          Preconditions.checkArgument(argv.length >= minArgs,
              "Too few arguments: expected at least " + minArgs
                  + " but only had " + argv.length);
View Full Code Here

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

  public static SourceBuilder builder() {
    return new SourceBuilder() {
      @Override
      public EventSource build(String... argv) {
        int size = 150;
        long count = 0;
        if (argv.length > 2) {
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.