Package com.flaptor.util

Examples of com.flaptor.util.Statistics


        ClusterManager cluster= ClusterManager.getInstance();
        NodeDescriptor node = cluster.getNodes().get(Integer.parseInt(request.getParameter("id")));
        String eventName = request.getParameter("eventName");
        MonitorModule monitor = (MonitorModule)cluster.getModule("monitor");
        MonitorNodeDescriptor mnode = monitor.getModuleNode(node);
        Statistics statistics = (Statistics)mnode.getLastState().getProperties().get("statistics");
        AdaptiveHistogram hist = statistics.getLastPeriodStats(eventName).getHistogram();
        Calendar c = DateUtil.getCanonicalDayFromToday(0);
       
        Map<Date, List<Number>> ret = new HashMap<Date, List<Number>>();
        float last = 0;
        for (int i = 0; i<100; i += 10) {
View Full Code Here


* @author Martin Massera
*/
public class SearcherChecker implements NodeChecker{

    public NodeChecker.Result checkNode(MonitorNodeDescriptor node, NodeState state) {
        Statistics statistics = (Statistics)state.getProperties().get("statistics");

        List<String> remarks = new ArrayList<String>();
        Sanity sanity = Sanity.GOOD;
        String exception = (String)state.getProperties().get("searcherException");
        if (exception != null) {
View Full Code Here

    @SuppressWarnings("unchecked")
    public NodeChecker.Result checkNode(MonitorNodeDescriptor node, NodeState state) {
        Sanity sanity = Sanity.GOOD;
        List<String> remarks = new ArrayList<String>();
       
        Statistics statistics = (Statistics)state.getProperties().get("statistics");
       
        List<String> indexUpdateProblems = (List<String>)state.getProperties().get("indexUpdateProblems");
        if (indexUpdateProblems != null && indexUpdateProblems.size() > 0) {
            sanity = Sanity.BAD;
            for (String problem: indexUpdateProblems) {
View Full Code Here

    this.searcher = searcher;
  }

  public void updateProperties() {
    super.updateProperties();
    Statistics stats = Statistics.getStatistics();
    TrafficLimitingSearcher tls = searcher.getTrafficLimitingSearcher();
    if (null != tls) {
      setProperty("maxSimultaneousQueries", String.valueOf(tls.getMaxSimultaneousQueries()));
      setProperty("simultaneousQueries", String.valueOf(tls.getSimultaneousQueries()));
    }
View Full Code Here

    public NodeChecker.Result checkNode(MonitorNodeDescriptor node, NodeState state) {
        List<String> remarks = new ArrayList<String>();
        Sanity sanity = Sanity.GOOD;
       
        Statistics stats = (Statistics) state.getProperties().get("statistics");
        if (null == stats) {
          remarks.add("No statistics to check.");
          sanity = Sanity.BAD;
        } else {
          for (String eventName : stats.getEvents()) {
            if (eventName.startsWith("averageTimes_")) {
              EventStats es = stats.getLastPeriodStats(eventName);
              if (es.numErrors > 0L) {
                remarks.add("Errors reported for event: " + eventName + '.');
                sanity = Sanity.BAD;
              }
            }
View Full Code Here

* @author Flaptor Development Team
*/
public class CacheServerChecker implements NodeChecker{

  public NodeChecker.Result checkNode(MonitorNodeDescriptor node, NodeState state) {
        Statistics statistics = (Statistics)state.getProperties().get("statistics");
     
      List<String> remarks = new ArrayList<String>();
      remarks.add("This is a stub checker, please write a sanity checker for this type of node.");
      return new Result(Sanity.GOOD, remarks);
  }
View Full Code Here

* @author Flaptor Development Team
*/
public class CrawlerChecker implements NodeChecker{

    public NodeChecker.Result checkNode(MonitorNodeDescriptor node, NodeState state) {
        Statistics statistics = (Statistics)state.getProperties().get("statistics");

        List<String> remarks = new ArrayList<String>();
        remarks.add("This is a stub checker, please write a sanity checker for this type of node.");
        return new Result(Sanity.GOOD, remarks);
    }
View Full Code Here

TOP

Related Classes of com.flaptor.util.Statistics

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.