Examples of CrawlDaemonController


Examples of org.apache.oodt.cas.crawl.daemon.CrawlDaemonController

    for (Iterator i = this.crawlProps.getCrawlers().iterator(); i.hasNext();) {
      CrawlInfo info = (CrawlInfo) i.next();
      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());
View Full Code Here

Examples of org.apache.oodt.cas.crawl.daemon.CrawlDaemonController

    for (Iterator i = this.crawlProps.getCrawlers().iterator(); i.hasNext();) {
      CrawlInfo info = (CrawlInfo) i.next();
      String crawlUrlStr = "http://" + this.crawlProps.getCrawlHost() + ":"
          + info.getCrawlerPort();
      try {
        CrawlDaemonController controller = new CrawlDaemonController(
            crawlUrlStr);
        System.out.println(info.getCrawlerName() + ":");
        System.out.println("Number of Crawls: " + controller.getNumCrawls());
        System.out.println("Average Crawl Time (seconds): "
            + (double) (controller.getAverageCrawlTime() / 1000.0));
        System.out.println("");

      } catch (Exception e) {
        System.out.println(info.getCrawlerName() + ": DOWN");
      }
View Full Code Here

Examples of org.apache.oodt.cas.crawl.daemon.CrawlDaemonController

      return false;
    }
  }

  private boolean getCrawlerUp(String crawlUrlStr) {
    CrawlDaemonController controller = null;

    try {
      controller = new CrawlDaemonController(crawlUrlStr);
      return controller.isRunning();
    } catch (Exception e) {
      return false;
    }
  }
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.