Package com.cloudera.flume.conf

Examples of com.cloudera.flume.conf.FlumeConfiguration


    }

    loadOutputFormatPlugins();

    // Instantiate the flume node.
    FlumeConfiguration conf = FlumeConfiguration.get();

    FlumeNode flume = new FlumeNode(nodename, conf, startHttp, oneshot);

    flume.start();
View Full Code Here


    }
  }

  public WALManager addWalManager(String walnode) {
    Preconditions.checkArgument(walnode != null);
    FlumeConfiguration conf = FlumeConfiguration.get();
    WALManager wm = new NaiveFileWALManager(new File(new File(conf
        .getAgentLogsDir()), walnode));
    synchronized (walMans) {
      walMans.put(walnode, wm);
      return wm;
    }
View Full Code Here

    }
  }

  public DiskFailoverManager addDFOManager(String dfonode) {
    Preconditions.checkArgument(dfonode != null);
    FlumeConfiguration conf = FlumeConfiguration.get();
    DiskFailoverManager wm = new NaiveFileFailoverManager(new File(new File(
        conf.getAgentLogsDir()), dfonode));
    synchronized (failoverMans) {
      failoverMans.put(dfonode, wm);
      return wm;
    }
  }
View Full Code Here

      @Override
      public EventSinkDecorator<EventSink> build(Context context,
          String... argv) {
        Preconditions.checkArgument(argv.length <= 1,
            "usage: diskFailover[(maxMillis[, checkmillis])]");
        FlumeConfiguration conf = FlumeConfiguration.get();
        long delayMillis = conf.getAgentLogMaxAge();

        if (argv.length >= 1) {
          delayMillis = Long.parseLong(argv[0]);
        }
View Full Code Here

  /**
   * Create hive notification using defaults from FlumeConfiguration.
   */
  public HiveDirCreatedNotification(String table, String dir,
      Map<String, String> meta) {
    FlumeConfiguration conf = FlumeConfiguration.get();
    this.host = conf.getHiveHost();
    this.port = conf.getHivePort();
    this.user = conf.getHiveUser();
    this.pw = conf.getHiveUserPW();
    this.table = table;
    this.dir = dir;
    this.meta = meta;
  }
View Full Code Here

*
*/
public class TestDFSWrite {
  @Test
  public void testDirectWrite() throws IOException {
    FlumeConfiguration conf = FlumeConfiguration.get();

    Path path = new Path("file:///tmp/testfile");
    FileSystem hdfs = path.getFileSystem(conf);
    hdfs.deleteOnExit(path);

View Full Code Here

    return new SourceBuilder() {
      @Override
      public EventSource build(Context ctx, String... argv) {
        Preconditions.checkArgument(argv.length <= 3,
            "usage: twitter[(name[,pw[,url]])]");
        FlumeConfiguration conf = FlumeConfiguration.get();
        String name = conf.getTwitterName();
        if (argv.length >= 1)
          name = argv[0];

        String pw = conf.getTwitterPW();
        if (argv.length >= 2)
          pw = argv[1];

        String url = conf.getTwitterURL();
        if (argv.length >= 3)
          url = argv[2];

        return new TwitterStreamSource(url, name, pw);
      }
View Full Code Here

    hdfs.close();
  }

  @Test
  public void testHDFSSequenceFileWrite() throws IOException {
    FlumeConfiguration conf = FlumeConfiguration.get();

    Path path = new Path("file:///tmp/testfile");
    FileSystem hdfs = path.getFileSystem(conf);
    hdfs.deleteOnExit(path);
View Full Code Here

    hdfs.close();
  }

  @Test
  public void testHDFSEventSink() throws IOException, InterruptedException {
    FlumeConfiguration conf = FlumeConfiguration.get();
    String str = "file:///tmp/testfile";
    Path path = new Path(str);
    DFSEventSink sink = new DFSEventSink(str);

    FileSystem hdfs = path.getFileSystem(conf);
View Full Code Here

   *
   * @throws InterruptedException
   */
  @Test
  public void testTaggedWrites() throws IOException, InterruptedException {
    FlumeConfiguration conf = FlumeConfiguration.get();
    String template = "file:///tmp/testfile-%{mytag}";
    String real1 = "file:///tmp/testfile-one";
    String real2 = "file:///tmp/testfile-two";

    DFSEventSink sink = new DFSEventSink(template);
View Full Code Here

TOP

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

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.