Package org.apache.hadoop.chukwa.datacollection

Examples of org.apache.hadoop.chukwa.datacollection.OffsetStatsManager


      controlSock.start(); // this sets us up as a daemon
      log.info("control socket started on port " + controlSock.portno);

      // start the HTTP server with stats collection
      try {
        this.adaptorStatsManager = new OffsetStatsManager(STATS_DATA_TTL_MS);
        this.statsCollector = new Timer("ChukwaAgent Stats Collector");

        startHttpServer(conf);

        statsCollector.scheduleAtFixedRate(new StatsCollectorTask(),


    appendNvp(out, indent, "data_type", adaptor.getType());
    appendNvp(out, indent, "offset", agent.offset(adaptor).offset());
    appendNvp(out, indent, "adaptor_class", adaptor.getClass().getName());
    appendNvp(out, indent, "adaptor_params", adaptor.getCurrentStatus(), true);

    OffsetStatsManager adaptorStats = agent.getAdaptorStatsManager();

    appendNvp(out, indent, "average_rates", "");
    indent += 4;
    appendNvp(out, indent, "- rate",
            DECIMAL_FORMAT.format(adaptorStats.calcAverageRate(adaptor,  60)));
    appendNvp(out, indent, "interval", "60");
    appendNvp(out, indent, "- rate",
            DECIMAL_FORMAT.format(adaptorStats.calcAverageRate(adaptor,  300)));
    appendNvp(out, indent, "interval", "300");
    appendNvp(out, indent, "- rate",
            DECIMAL_FORMAT.format(adaptorStats.calcAverageRate(adaptor,  600)));
    appendNvp(out, indent, "interval", "600");
    indent -= 4;
  }

            "offset", agent.offset(adaptor).offset());

    appendElement(out, "AdaptorClass", adaptor.getClass().getName());
    appendElement(out, "AdaptorParams", adaptor.getCurrentStatus());

    OffsetStatsManager adaptorStats = agent.getAdaptorStatsManager();

    appendElement(out, "AverageRate",
            DECIMAL_FORMAT.format(adaptorStats.calcAverageRate(adaptor,  60)),
            "intervalSeconds", "60");
    appendElement(out, "AverageRate",
            DECIMAL_FORMAT.format(adaptorStats.calcAverageRate(adaptor,  300)),
            "intervalSeconds", "300");
    appendElement(out, "AverageRate",
            DECIMAL_FORMAT.format(adaptorStats.calcAverageRate(adaptor,  600)),
            "intervalSeconds", "600");

    appendEndTag(out, "Adaptor");
  }

      controlSock.start(); // this sets us up as a daemon
      log.info("control socket started on port " + controlSock.portno);

      // start the HTTP server with stats collection
      try {
        this.adaptorStatsManager = new OffsetStatsManager(STATS_DATA_TTL_MS);
        this.statsCollector = new Timer("ChukwaAgent Stats Collector");

        startHttpServer(conf);

        statsCollector.scheduleAtFixedRate(new StatsCollectorTask(),

TOP

Related Classes of org.apache.hadoop.chukwa.datacollection.OffsetStatsManager

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.