Package com.cloudera.flume.reporter.builder

Examples of com.cloudera.flume.reporter.builder.SimpleRegexReporterBuilder.load()


  @Test
  public void testLoad() throws IOException, InterruptedException {
    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(
        APACHE_REGEXES);

    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
    mr.open();
    mr.append(new EventImpl(sample.getBytes()));

    for (EventSink r : sinks) {
View Full Code Here


    EventSource src = new NoNlASCIISynthSource(25, 100, 1);
    src.open();

    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(
        HADOOP_REGEXES);
    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
    mr.open();

    EventUtil.dumpAll(src, mr);
View Full Code Here

    b.mark("disk_loaded");

    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);
View Full Code Here

    b.mark("disk_loaded");

    SimpleRegexReporterBuilder bld = new SimpleRegexReporterBuilder(
        HADOOP_REGEXES_11);

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

        String fname = argv[0];
        SimpleRegexReporterBuilder srrb = new SimpleRegexReporterBuilder(fname);
        Collection<RegexGroupHistogramSink> sinks;
        try {
          sinks = srrb.load();
        } catch (IOException e) {
          throw new IllegalArgumentException(
              "Failed to create regex report from spec file " + fname + ": "
                  + e);
        }
View Full Code Here

  public void testLoad() throws IOException, InterruptedException {
    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(
        getClass().getClassLoader()
        .getResource(APACHE_REGEXES).getFile());

    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
    mr.open();
    mr.append(new EventImpl(sample.getBytes()));

    for (EventSink r : sinks) {
View Full Code Here

    EventSource src = new NoNlASCIISynthSource(25, 100, 1);
    src.open();

    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(getClass()
        .getClassLoader().getResource(HADOOP_REGEXES).getFile());
    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
    mr.open();

    EventUtil.dumpAll(src, mr);
View Full Code Here

        String fname = argv[0];
        SimpleRegexReporterBuilder srrb = new SimpleRegexReporterBuilder(fname);
        Collection<RegexGroupHistogramSink> sinks;
        try {
          sinks = srrb.load();
        } catch (IOException e) {
          throw new IllegalArgumentException(
              "Failed to create regex report from spec file " + fname + ": "
                  + e);
        }
View Full Code Here

  @Test
  public void testLoad() throws IOException {
    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(
        APACHE_REGEXES);

    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
    mr.open();
    mr.append(new EventImpl(sample.getBytes()));

    for (EventSink r : sinks) {
View Full Code Here

    EventSource src = new NoNlASCIISynthSource(25, 100, 1);
    src.open();

    SimpleRegexReporterBuilder b = new SimpleRegexReporterBuilder(
        HADOOP_REGEXES);
    Collection<RegexGroupHistogramSink> sinks = b.load();
    MultiReporter mr = new MultiReporter("apache_sinks", sinks);
    mr.open();

    EventUtil.dumpAll(src, mr);
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.