Examples of open()


Examples of com.cloudera.flume.handlers.hdfs.SeqfileEventSink.open()

    b.mark("disk_loaded");

    File tmp = File.createTempFile("test", "tmp");
    tmp.deleteOnExit();
    SeqfileEventSink sink = new SeqfileEventSink(tmp);
    sink.open();
    b.mark("receiver_started");

    EventUtil.dumpAll(mem, sink);

    b.mark("seqfile_disk_write");
View Full Code Here

Examples of com.cloudera.flume.handlers.hdfs.SeqfileEventSource.open()

    // //////// second phase using the file written in previous phase.
    Benchmark b2 = new Benchmark("seqfile_disk_read");
    b2.mark("begin");

    SeqfileEventSource seq = new SeqfileEventSource(tmp.getAbsolutePath());
    seq.open();
    MemorySinkSource mem2 = new MemorySinkSource();
    EventUtil.dumpAll(seq, mem2);
    seq.close();
    b2.mark("seqfile_loaded");
View Full Code Here

Examples of com.cloudera.flume.handlers.rolling.RollSink.open()

      @Override
      public EventSink newSink(Context ctx) throws IOException {
        return sink;
      }
    };
    roll.open();

    // create an endless stream of data
    final EventSource source = new EventSource.Base() {
      @Override
      public Event next() {
View Full Code Here

Examples of com.cloudera.flume.handlers.thrift.ThriftEventSink.open()

    drain.start(); // drain the sink.
    b.mark("receiver_started");

    final ThriftEventSink snk = new ThriftEventSink("0.0.0.0", conf
        .getCollectorPort());
    snk.open();
    b.mark("sink_started");

    EventUtil.dumpAll(mem, snk);
    b.mark("thrift sink to thrift source done");
View Full Code Here

Examples of com.cloudera.flume.handlers.thrift.ThriftEventSource.open()

    txt.close();
    b.mark("disk_loaded");

    FlumeConfiguration conf = FlumeConfiguration.get();
    final ThriftEventSource tes = new ThriftEventSource(conf.getCollectorPort());
    tes.open();
    // need to drain the sink otherwise its queue will fill up with events!
    Thread drain = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, new NullSink());
View Full Code Here

Examples of com.cloudera.flume.reporter.MultiReporter.open()

    SimpleRegexReporterBuilder bld = new SimpleRegexReporterBuilder(
        HADOOP_REGEXES);

    Collection<RegexGroupHistogramSink> sinks = bld.load();
    MultiReporter snk = new MultiReporter("hadoop_regex_sinks", sinks);
    snk.open();
    b.mark("filters_loaded", new File(HADOOP_REGEXES).getName(), sinks.size());

    EventUtil.dumpAll(mem, snk);
    b.mark(snk.getName() + " done");
View Full Code Here

Examples of com.cloudera.flume.reporter.aggregator.AccumulatorSink.open()

  public void testExistingFiles() throws IOException, InterruptedException {
    File tmpdir = FileUtil.mktempdir();
    TailDirSource src = new TailDirSource(tmpdir, ".*");
    AccumulatorSink cnt = new AccumulatorSink("tailcount");
    src.open();
    cnt.open();
    DirectDriver drv = new DirectDriver(src, cnt);

    genFiles(tmpdir, "foo", 10, 100);

    drv.start();
View Full Code Here

Examples of com.cloudera.flume.reporter.aggregator.CounterSink.open()

    FlumeConfiguration conf = FlumeConfiguration.get();
    final AvroEventSource tes = new AvroEventSource(conf.getCollectorPort() + 1);
    tes.open();

    final CounterSink cnt = new CounterSink("count");
    cnt.open();
    Thread t = new Thread("drain") {
      public void run() {
        try {
          EventUtil.dumpAll(tes, cnt);
        } catch (Exception e) {
View Full Code Here

Examples of com.cloudera.flume.reporter.history.CountHistoryReporter.open()

  @Test
  public void testTestCountHistory() throws IOException, InterruptedException {
    // have a huge period and just force them in the test.
    CountHistoryReporter r = new CountHistoryReporter("test timeline", 5000000,
        t);
    r.open();
    Event e = new EventImpl("Test message".getBytes());

    // just a little forward to make things slighlty "out of sync"
    // 3
    r.append(e);
View Full Code Here

Examples of com.cloudera.sqoop.metastore.JobStorage.open()

    if (null != jobName && null != descriptor) {
      // Actually save it back to the metastore.
      LOG.info("Saving incremental import state to the metastore");
      JobStorageFactory ssf = new JobStorageFactory(options.getConf());
      JobStorage storage = ssf.getJobStorage(descriptor);
      storage.open(descriptor);
      try {
        // Save the 'parent' SqoopOptions; this does not contain the mutations
        // to the SqoopOptions state that occurred over the course of this
        // execution, except for the one we specifically want to memorize:
        // the latest value of the check column.
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.