Package org.apache.hadoop.chukwa.inputtools.jplugin

Examples of org.apache.hadoop.chukwa.inputtools.jplugin.GenericChukwaMetricsList


    System.out.println();

    String xml = list.toXml();
    System.out.println(xml);

    GenericChukwaMetricsList gene = new GenericChukwaMetricsList(xml);
    System.out.println(list.getTimestamp());
    for (ChukwaMetrics metrics : gene.getMetricsList()) {
      System.out.print(metrics.getKey());
      for (Entry<String, String> entry : metrics.getAttributes().entrySet()) {
        System.out.println(entry.getKey() + ": " + entry.getValue());
      }
    }
View Full Code Here


  protected void parse(String recordEntry,
      OutputCollector<ChukwaRecordKey, ChukwaRecord> output,
      Reporter reporter) throws Throwable {
    LogEntry entry = new LogEntry(recordEntry);
    String xml = entry.getBody();
    GenericChukwaMetricsList metricsList = new GenericChukwaMetricsList();
    metricsList.fromXml(xml);
    String recType = metricsList.getRecordType();
    long timestamp = metricsList.getTimestamp();
    for (ChukwaMetrics metrics : metricsList.getMetricsList()) {
      key = new ChukwaRecordKey();
      ChukwaRecord record = new ChukwaRecord();
      this.buildGenericRecord(record, null, -1l, recType);
      record.setTime(timestamp);
      key.setKey(getKey(timestamp, metrics.getKey()));
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.inputtools.jplugin.GenericChukwaMetricsList

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.