Examples of ReportEvent


Examples of com.cloudera.flume.reporter.ReportEvent

      t.interrupt();
    } catch (InterruptedException e) {
    }
    tes.close();
    assertEquals(25, cnt.getCount());
    ReportEvent rpt = tes.getMetrics();
    assertEquals(4475, rpt.getLongMetric(ThriftEventSource.A_BYTES_IN)
        .longValue());
    assertEquals(25, rpt.getLongMetric(ThriftEventSource.A_DEQUEUED)
        .longValue());
    assertEquals(25, rpt.getLongMetric(ThriftEventSource.A_ENQUEUED)
        .longValue());
    assertEquals(0, rpt.getLongMetric(ThriftEventSource.A_QUEUE_CAPACITY)
        .intValue());
    assertEquals(1000, rpt.getLongMetric(ThriftEventSource.A_QUEUE_FREE)
        .intValue());

  }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

    // a little delay get data to the receiving side.
    Thread.sleep(1000);

    tes.close();
    assertEquals(25 * threads, cnt.getCount());
    ReportEvent rpt = tes.getMetrics();
    assertEquals(4475 * threads, sendByteSum.get());
    assertEquals(4475 * threads, rpt
        .getLongMetric(ThriftEventSource.A_BYTES_IN).longValue());
    assertEquals(25 * threads, rpt.getLongMetric(ThriftEventSource.A_DEQUEUED)
        .longValue());
    assertEquals(25 * threads, rpt.getLongMetric(ThriftEventSource.A_ENQUEUED)
        .longValue());
    assertEquals(0, rpt.getLongMetric(ThriftEventSource.A_QUEUE_CAPACITY)
        .longValue());
    assertEquals(1000, rpt.getLongMetric(ThriftEventSource.A_QUEUE_FREE)
        .longValue());

  }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

        } else {
          failCount++;
        }
      }

      ReportEvent rpt = getMetrics();
      LOG.info(rpt.toText());
      reportSink.append(e);
      // record info but do not pass the message on.
      return;
    }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

  /**
   * {@inheritDoc}
   */
  @Override
  synchronized public ReportEvent getMetrics() {
    ReportEvent evt = super.getMetrics();
    evt.set(A_STATE, state.toString().getBytes());
    Attributes.setInt(evt, A_SUCCESS, successCount);
    Attributes.setInt(evt, A_FAILS, failCount);
    return evt;
  }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

    return "FlowConfigManager";
  }

  @Override
  synchronized public ReportEvent getMetrics() {
    ReportEvent rpt = new ReportEvent(getName());
    return rpt;
  }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

    } else if (Arrays.equals(bench, BenchmarkInjectDecorator.BENCH_STOP)) {
      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkDone");
      b.done();

      ReportEvent rpt = getMetrics();
      LOG.info(rpt.toText());
      reportSink.append(rpt);

    } else if (Arrays.equals(bench, BenchmarkInjectDecorator.BENCH_ERROR)) {
      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkError");
      b.done();
      LOG.info(getMetrics().toText());

      ReportEvent rpt = getMetrics();
      LOG.info(rpt.toText());
      reportSink.append(rpt);
    } else {
      String msg = "Unexpected Benchmark event type: " + tag;
      LOG.error(msg);
      throw new IllegalArgumentException(msg);
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

    return name;
  }

  @Override
  public ReportEvent getMetrics() {
    ReportEvent rpt = new ReportEvent(getName());

    StringWriter sw = new StringWriter();
    PrintWriter out = new PrintWriter(sw);
    StringWriter csvsw = new StringWriter();
    PrintWriter csvpw = new PrintWriter(csvsw);
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

  }

  @Override
  public ReportEvent getMetrics() {
    ReportEvent rpt = super.getMetrics();
    rpt.setLongMetric(R_FAILS, fails);
    rpt.setLongMetric(R_BACKUPS, backups);
    return rpt;
  }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

  }

  @Deprecated
  @Override
  public ReportEvent getReport() {
    ReportEvent rpt = super.getReport();
    rpt.setLongMetric(R_FAILS, fails);
    rpt.setLongMetric(R_BACKUPS, backups);
    return rpt;
  }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent

    return "CustomDfs";
  }

  @Override
  public ReportEvent getMetrics() {
    ReportEvent rpt = super.getMetrics();
    rpt.setStringMetric(A_OUTPUTFORMAT, format.getBuilder().getName());
    rpt.setLongMetric(ReportEvent.A_COUNT, count.get());
    return rpt;
  }
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.