Package org.apache.oodt.pcs.health

Examples of org.apache.oodt.pcs.health.CrawlerHealth


       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<CrawlerHealth> item) {
        CrawlerHealth health = item.getModelObject();
        item.add(new Label("crawler_name", health.getCrawlerName()));
        item.add(new Label("num_crawls", String.valueOf(health.getNumCrawls())));
        item.add(new Label("avg_crawl_time", String.valueOf(health
            .getAvgCrawlTime())));
      }
    });

  }
View Full Code Here


      String crawlUrlStr = "http://" + this.crawlProps.getCrawlHost() + ":"
          + info.getCrawlerPort();
      try {
        CrawlDaemonController controller = new CrawlDaemonController(
            crawlUrlStr);
        CrawlerHealth health = new CrawlerHealth();
        health.setCrawlerName(info.getCrawlerName());
        health.setNumCrawls(controller.getNumCrawls());
        health
            .setAvgCrawlTime((double) (controller.getAverageCrawlTime() / 1000.0));
        statuses.add(health);

      } catch (Exception e) {
        CrawlerHealth health = new CrawlerHealth();
        health.setCrawlerName(info.getCrawlerName());
        health.setNumCrawls(CRAWLER_DOWN_INT);
        health.setAvgCrawlTime(CRAWLER_DOWN_DOUBLE);
        statuses.add(health);
      }

    }
View Full Code Here

  private void printIngestStatusHealth(PCSHealthMonitorReport report) {
    if (report.getCrawlerHealthStatus() != null
        && report.getCrawlerHealthStatus().size() > 0) {
      for (Iterator i = report.getCrawlerHealthStatus().iterator(); i.hasNext();) {
        CrawlerHealth health = (CrawlerHealth) i.next();
        System.out.print(health.getCrawlerName() + ":");
        if (health.getNumCrawls() == CRAWLER_DOWN_INT) {
          System.out.println(" DOWN");
        } else {
          System.out.println("");
          System.out.println("Number of Crawls: " + health.getNumCrawls());
          System.out.println("Average Crawl Time (seconds): "
              + health.getAvgCrawlTime());
          System.out.println("");
        }

      }
View Full Code Here

TOP

Related Classes of org.apache.oodt.pcs.health.CrawlerHealth

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.