You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2011/03/09 05:02:12 UTC

svn commit: r1079660 [15/17] - in /oodt/site/components/maven: apidocs/org/apache/oodt/cas/crawl/action/ apidocs/org/apache/oodt/cas/crawl/action/class-use/ apidocs/org/apache/oodt/cas/filemgr/metadata/ apidocs/org/apache/oodt/cas/filemgr/metadata/clas...

Added: oodt/site/components/maven/xref/org/apache/oodt/pcs/tools/PCSHealthMonitor.html
URL: http://svn.apache.org/viewvc/oodt/site/components/maven/xref/org/apache/oodt/pcs/tools/PCSHealthMonitor.html?rev=1079660&view=auto
==============================================================================
--- oodt/site/components/maven/xref/org/apache/oodt/pcs/tools/PCSHealthMonitor.html (added)
+++ oodt/site/components/maven/xref/org/apache/oodt/pcs/tools/PCSHealthMonitor.html Wed Mar  9 04:02:09 2011
@@ -0,0 +1,656 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xml:lang="en"><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>PCSHealthMonitor xref</title><link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" /></head><body>
+<div id="overview"><a href="../../../../../../apidocs/org/apache/oodt/pcs/tools/PCSHealthMonitor.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1" id="1">1</a>   <em class="jxr_javadoccomment">/**</em>
+<a name="2" href="#2" id="2">2</a>   <em class="jxr_javadoccomment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a name="3" href="#3" id="3">3</a>   <em class="jxr_javadoccomment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a name="4" href="#4" id="4">4</a>   <em class="jxr_javadoccomment"> * this work for additional information regarding copyright ownership.</em>
+<a name="5" href="#5" id="5">5</a>   <em class="jxr_javadoccomment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a name="6" href="#6" id="6">6</a>   <em class="jxr_javadoccomment"> * (the "License"); you may not use this file except in compliance with</em>
+<a name="7" href="#7" id="7">7</a>   <em class="jxr_javadoccomment"> * the License.  You may obtain a copy of the License at</em>
+<a name="8" href="#8" id="8">8</a>   <em class="jxr_javadoccomment"> *</em>
+<a name="9" href="#9" id="9">9</a>   <em class="jxr_javadoccomment"> *     <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10" id="10">10</a>  <em class="jxr_javadoccomment"> *</em>
+<a name="11" href="#11" id="11">11</a>  <em class="jxr_javadoccomment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12" id="12">12</a>  <em class="jxr_javadoccomment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13" id="13">13</a>  <em class="jxr_javadoccomment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14" id="14">14</a>  <em class="jxr_javadoccomment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15" id="15">15</a>  <em class="jxr_javadoccomment"> * limitations under the License.</em>
+<a name="16" href="#16" id="16">16</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="17" href="#17" id="17">17</a>  
+<a name="18" href="#18" id="18">18</a>  <strong class="jxr_keyword">package</strong> org.apache.oodt.pcs.tools;
+<a name="19" href="#19" id="19">19</a>  
+<a name="20" href="#20" id="20">20</a>  <em class="jxr_comment">//JDK imports</em>
+<a name="21" href="#21" id="21">21</a>  <strong class="jxr_keyword">import</strong> java.util.Calendar;
+<a name="22" href="#22" id="22">22</a>  <strong class="jxr_keyword">import</strong> java.util.Collections;
+<a name="23" href="#23" id="23">23</a>  <strong class="jxr_keyword">import</strong> java.util.Comparator;
+<a name="24" href="#24" id="24">24</a>  <strong class="jxr_keyword">import</strong> java.util.Date;
+<a name="25" href="#25" id="25">25</a>  <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="26" href="#26" id="26">26</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a name="27" href="#27" id="27">27</a>  <strong class="jxr_keyword">import</strong> java.util.Vector;
+<a name="28" href="#28" id="28">28</a>  
+<a name="29" href="#29" id="29">29</a>  <em class="jxr_comment">//APACHE imports</em>
+<a name="30" href="#30" id="30">30</a>  <strong class="jxr_keyword">import</strong> org.apache.xmlrpc.XmlRpcClient;
+<a name="31" href="#31" id="31">31</a>  
+<a name="32" href="#32" id="32">32</a>  <em class="jxr_comment">//OODT imports</em>
+<a name="33" href="#33" id="33">33</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.commons.date.DateUtils;
+<a name="34" href="#34" id="34">34</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.cas.metadata.Metadata;
+<a name="35" href="#35" id="35">35</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
+<a name="36" href="#36" id="36">36</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.cas.filemgr.structs.Product;
+<a name="37" href="#37" id="37">37</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.cas.resource.structs.ResourceNode;
+<a name="38" href="#38" id="38">38</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.cas.crawl.daemon.CrawlDaemonController;
+<a name="39" href="#39" id="39">39</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.util.FileManagerUtils;
+<a name="40" href="#40" id="40">40</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.util.ResourceManagerUtils;
+<a name="41" href="#41" id="41">41</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.util.WorkflowManagerUtils;
+<a name="42" href="#42" id="42">42</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.CrawlInfo;
+<a name="43" href="#43" id="43">43</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.CrawlPropertiesFile;
+<a name="44" href="#44" id="44">44</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.CrawlerHealth;
+<a name="45" href="#45" id="45">45</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.CrawlerStatus;
+<a name="46" href="#46" id="46">46</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.JobHealthStatus;
+<a name="47" href="#47" id="47">47</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.PCSDaemonStatus;
+<a name="48" href="#48" id="48">48</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.PCSHealthMonitorMetKeys;
+<a name="49" href="#49" id="49">49</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.PCSHealthMonitorReport;
+<a name="50" href="#50" id="50">50</a>  <strong class="jxr_keyword">import</strong> org.apache.oodt.pcs.health.WorkflowStatesFile;
+<a name="51" href="#51" id="51">51</a>  
+<a name="52" href="#52" id="52">52</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="53" href="#53" id="53">53</a>  <em class="jxr_javadoccomment"> * </em>
+<a name="54" href="#54" id="54">54</a>  <em class="jxr_javadoccomment"> * A tool to monitor the health of the PCS.</em>
+<a name="55" href="#55" id="55">55</a>  <em class="jxr_javadoccomment"> * </em>
+<a name="56" href="#56" id="56">56</a>  <em class="jxr_javadoccomment"> * @author mattmann</em>
+<a name="57" href="#57" id="57">57</a>  <em class="jxr_javadoccomment"> * @version $Revision$</em>
+<a name="58" href="#58" id="58">58</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="59" href="#59" id="59">59</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/oodt/pcs/tools/PCSHealthMonitor.html">PCSHealthMonitor</a> implements CoreMetKeys,
+<a name="60" href="#60" id="60">60</a>      <a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorMetKeys.html">PCSHealthMonitorMetKeys</a> {
+<a name="61" href="#61" id="61">61</a>  
+<a name="62" href="#62" id="62">62</a>    <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/util/FileManagerUtils.html">FileManagerUtils</a> fm;
+<a name="63" href="#63" id="63">63</a>  
+<a name="64" href="#64" id="64">64</a>    <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/util/WorkflowManagerUtils.html">WorkflowManagerUtils</a> wm;
+<a name="65" href="#65" id="65">65</a>  
+<a name="66" href="#66" id="66">66</a>    <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/util/ResourceManagerUtils.html">ResourceManagerUtils</a> rm;
+<a name="67" href="#67" id="67">67</a>  
+<a name="68" href="#68" id="68">68</a>    <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/health/CrawlPropertiesFile.html">CrawlPropertiesFile</a> crawlProps;
+<a name="69" href="#69" id="69">69</a>  
+<a name="70" href="#70" id="70">70</a>    <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/health/WorkflowStatesFile.html">WorkflowStatesFile</a> statesFile;
+<a name="71" href="#71" id="71">71</a>  
+<a name="72" href="#72" id="72">72</a>    <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/oodt/pcs/tools/PCSHealthMonitor.html">PCSHealthMonitor</a>(String fmUrlStr, String wmUrlStr, String rmUrlStr,
+<a name="73" href="#73" id="73">73</a>        String crawlPropFilePath, String statesFilePath)
+<a name="74" href="#74" id="74">74</a>        <strong class="jxr_keyword">throws</strong> InstantiationException {
+<a name="75" href="#75" id="75">75</a>      <strong class="jxr_keyword">this</strong>.fm = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/util/FileManagerUtils.html">FileManagerUtils</a>(fmUrlStr);
+<a name="76" href="#76" id="76">76</a>      <strong class="jxr_keyword">this</strong>.wm = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/util/WorkflowManagerUtils.html">WorkflowManagerUtils</a>(wmUrlStr);
+<a name="77" href="#77" id="77">77</a>      <strong class="jxr_keyword">this</strong>.rm = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/util/ResourceManagerUtils.html">ResourceManagerUtils</a>(rmUrlStr);
+<a name="78" href="#78" id="78">78</a>      <strong class="jxr_keyword">this</strong>.crawlProps = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/CrawlPropertiesFile.html">CrawlPropertiesFile</a>(crawlPropFilePath);
+<a name="79" href="#79" id="79">79</a>      <strong class="jxr_keyword">this</strong>.statesFile = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/WorkflowStatesFile.html">WorkflowStatesFile</a>(statesFilePath);
+<a name="80" href="#80" id="80">80</a>    }
+<a name="81" href="#81" id="81">81</a>  
+<a name="82" href="#82" id="82">82</a>    <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> getReport() {
+<a name="83" href="#83" id="83">83</a>      <a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a>();
+<a name="84" href="#84" id="84">84</a>      report.setGenerationDate(<strong class="jxr_keyword">new</strong> Date());
+<a name="85" href="#85" id="85">85</a>      report.setFmStatus(getFileManagerStatus());
+<a name="86" href="#86" id="86">86</a>      report.setWmStatus(getWorkflowManagerStatus());
+<a name="87" href="#87" id="87">87</a>      report.setRmStatus(getResourceManagerStatus());
+<a name="88" href="#88" id="88">88</a>      report.setBatchStubStatus(getBatchStubStatus());
+<a name="89" href="#89" id="89">89</a>      report.setCrawlerStatus(getCrawlerStatus());
+<a name="90" href="#90" id="90">90</a>      report.setLatestProductsIngested(getProductHealth());
+<a name="91" href="#91" id="91">91</a>      report.setJobHealthStatus(getJobStatusHealth());
+<a name="92" href="#92" id="92">92</a>      report.setCrawlerHealthStatus(getIngestHealth());
+<a name="93" href="#93" id="93">93</a>  
+<a name="94" href="#94" id="94">94</a>      <strong class="jxr_keyword">return</strong> report;
+<a name="95" href="#95" id="95">95</a>    }
+<a name="96" href="#96" id="96">96</a>  
+<a name="97" href="#97" id="97">97</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> quickPrintMonitorToConsole() {
+<a name="98" href="#98" id="98">98</a>      System.out.println(HEADER_AND_FOOTER);
+<a name="99" href="#99" id="99">99</a>      System.out.println(REPORT_BANNER);
+<a name="100" href="#100" id="100">100</a>     System.out.println(<span class="jxr_string">"Generated on: "</span>
+<a name="101" href="#101" id="101">101</a>         + DateUtils.toString(Calendar.getInstance()));
+<a name="102" href="#102" id="102">102</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="103" href="#103" id="103">103</a>     System.out.println(<span class="jxr_string">"Service Status:"</span>);
+<a name="104" href="#104" id="104">104</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="105" href="#105" id="105">105</a> 
+<a name="106" href="#106" id="106">106</a>     System.out.println(FILE_MANAGER_DAEMON_NAME
+<a name="107" href="#107" id="107">107</a>         + getStrPadding(FILE_MANAGER_DAEMON_NAME, WORKFLOW_MANAGER_DAEMON_NAME)
+<a name="108" href="#108" id="108">108</a>         + <span class="jxr_string">":\t["</span> + <strong class="jxr_keyword">this</strong>.fm.getFmUrl() + <span class="jxr_string">"]: "</span> + printUp(getFmUp()));
+<a name="109" href="#109" id="109">109</a> 
+<a name="110" href="#110" id="110">110</a>     System.out.println(WORKFLOW_MANAGER_DAEMON_NAME + <span class="jxr_string">":\t["</span>
+<a name="111" href="#111" id="111">111</a>         + <strong class="jxr_keyword">this</strong>.wm.getWmUrl() + <span class="jxr_string">"]: "</span> + printUp(getWmUp()));
+<a name="112" href="#112" id="112">112</a> 
+<a name="113" href="#113" id="113">113</a>     System.out.println(RESOURCE_MANAGER_DAEMON_NAME + <span class="jxr_string">":\t["</span>
+<a name="114" href="#114" id="114">114</a>         + <strong class="jxr_keyword">this</strong>.rm.getResmgrUrl() + <span class="jxr_string">"]: "</span> + printUp(getRmUp()));
+<a name="115" href="#115" id="115">115</a> 
+<a name="116" href="#116" id="116">116</a>     quickPrintBatchStubs();
+<a name="117" href="#117" id="117">117</a> 
+<a name="118" href="#118" id="118">118</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="119" href="#119" id="119">119</a>     System.out.println(<span class="jxr_string">"Crawlers:"</span>);
+<a name="120" href="#120" id="120">120</a>     quickPrintCrawlers();
+<a name="121" href="#121" id="121">121</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="122" href="#122" id="122">122</a> 
+<a name="123" href="#123" id="123">123</a>     System.out.println(<span class="jxr_string">"PCS Health: "</span>);
+<a name="124" href="#124" id="124">124</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="125" href="#125" id="125">125</a>     System.out.println(<span class="jxr_string">"Files:"</span>);
+<a name="126" href="#126" id="126">126</a>     System.out.println(SECTION_SEPARATOR);
+<a name="127" href="#127" id="127">127</a> 
+<a name="128" href="#128" id="128">128</a>     quickPrintProductHealth();
+<a name="129" href="#129" id="129">129</a> 
+<a name="130" href="#130" id="130">130</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="131" href="#131" id="131">131</a>     System.out.println(<span class="jxr_string">"Jobs:"</span>);
+<a name="132" href="#132" id="132">132</a>     System.out.println(SECTION_SEPARATOR);
+<a name="133" href="#133" id="133">133</a> 
+<a name="134" href="#134" id="134">134</a>     quickPrintJobStatusHealth();
+<a name="135" href="#135" id="135">135</a> 
+<a name="136" href="#136" id="136">136</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="137" href="#137" id="137">137</a>     System.out.println(<span class="jxr_string">"Ingest:"</span>);
+<a name="138" href="#138" id="138">138</a>     System.out.println(SECTION_SEPARATOR);
+<a name="139" href="#139" id="139">139</a> 
+<a name="140" href="#140" id="140">140</a>     quickPrintIngestStatusHealth();
+<a name="141" href="#141" id="141">141</a> 
+<a name="142" href="#142" id="142">142</a>     System.out.println(HEADER_AND_FOOTER);
+<a name="143" href="#143" id="143">143</a> 
+<a name="144" href="#144" id="144">144</a>   }
+<a name="145" href="#145" id="145">145</a> 
+<a name="146" href="#146" id="146">146</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> printMonitorToConsole(<a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report) {
+<a name="147" href="#147" id="147">147</a> 
+<a name="148" href="#148" id="148">148</a>     System.out.println(HEADER_AND_FOOTER);
+<a name="149" href="#149" id="149">149</a>     System.out.println(REPORT_BANNER);
+<a name="150" href="#150" id="150">150</a>     System.out.println(<span class="jxr_string">"Generated on: "</span> + report.getCreateDateIsoFormat());
+<a name="151" href="#151" id="151">151</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="152" href="#152" id="152">152</a>     System.out.println(<span class="jxr_string">"Service Status:"</span>);
+<a name="153" href="#153" id="153">153</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="154" href="#154" id="154">154</a> 
+<a name="155" href="#155" id="155">155</a>     System.out.println(report.getFmStatus().getDaemonName()
+<a name="156" href="#156" id="156">156</a>         + getStrPadding(report.getFmStatus().getDaemonName(), report
+<a name="157" href="#157" id="157">157</a>             .getWmStatus().getDaemonName()) + <span class="jxr_string">":\t["</span>
+<a name="158" href="#158" id="158">158</a>         + report.getFmStatus().getUrlStr() + <span class="jxr_string">"]: "</span>
+<a name="159" href="#159" id="159">159</a>         + report.getFmStatus().getStatus());
+<a name="160" href="#160" id="160">160</a> 
+<a name="161" href="#161" id="161">161</a>     System.out.println(report.getWmStatus().getDaemonName() + <span class="jxr_string">":\t["</span>
+<a name="162" href="#162" id="162">162</a>         + report.getWmStatus().getUrlStr() + <span class="jxr_string">"]: "</span>
+<a name="163" href="#163" id="163">163</a>         + report.getWmStatus().getStatus());
+<a name="164" href="#164" id="164">164</a> 
+<a name="165" href="#165" id="165">165</a>     System.out.println(report.getRmStatus().getDaemonName() + <span class="jxr_string">":\t["</span>
+<a name="166" href="#166" id="166">166</a>         + report.getRmStatus().getUrlStr() + <span class="jxr_string">"]: "</span>
+<a name="167" href="#167" id="167">167</a>         + report.getRmStatus().getStatus());
+<a name="168" href="#168" id="168">168</a> 
+<a name="169" href="#169" id="169">169</a>     printBatchStubs(report);
+<a name="170" href="#170" id="170">170</a> 
+<a name="171" href="#171" id="171">171</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="172" href="#172" id="172">172</a>     System.out.println(<span class="jxr_string">"Crawlers:"</span>);
+<a name="173" href="#173" id="173">173</a>     printCrawlers(report);
+<a name="174" href="#174" id="174">174</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="175" href="#175" id="175">175</a> 
+<a name="176" href="#176" id="176">176</a>     System.out.println(<span class="jxr_string">"PCS Health: "</span>);
+<a name="177" href="#177" id="177">177</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="178" href="#178" id="178">178</a>     System.out.println(<span class="jxr_string">"Files:"</span>);
+<a name="179" href="#179" id="179">179</a>     System.out.println(SECTION_SEPARATOR);
+<a name="180" href="#180" id="180">180</a> 
+<a name="181" href="#181" id="181">181</a>     printProductHealth(report);
+<a name="182" href="#182" id="182">182</a> 
+<a name="183" href="#183" id="183">183</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="184" href="#184" id="184">184</a>     System.out.println(<span class="jxr_string">"Jobs:"</span>);
+<a name="185" href="#185" id="185">185</a>     System.out.println(SECTION_SEPARATOR);
+<a name="186" href="#186" id="186">186</a> 
+<a name="187" href="#187" id="187">187</a>     printJobStatusHealth(report);
+<a name="188" href="#188" id="188">188</a> 
+<a name="189" href="#189" id="189">189</a>     System.out.println(<span class="jxr_string">""</span>);
+<a name="190" href="#190" id="190">190</a>     System.out.println(<span class="jxr_string">"Ingest:"</span>);
+<a name="191" href="#191" id="191">191</a>     System.out.println(SECTION_SEPARATOR);
+<a name="192" href="#192" id="192">192</a> 
+<a name="193" href="#193" id="193">193</a>     printIngestStatusHealth(report);
+<a name="194" href="#194" id="194">194</a> 
+<a name="195" href="#195" id="195">195</a>     System.out.println(HEADER_AND_FOOTER);
+<a name="196" href="#196" id="196">196</a> 
+<a name="197" href="#197" id="197">197</a>   }
+<a name="198" href="#198" id="198">198</a> 
+<a name="199" href="#199" id="199">199</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> main(String[] args) <strong class="jxr_keyword">throws</strong> Exception {
+<a name="200" href="#200" id="200">200</a>     String usage = <span class="jxr_string">"PCSHealthMonitor &lt;fm url&gt; &lt;wm url&gt; &lt;rm url&gt; &lt;crawler xml file path&gt; &lt;workflow states xml file path&gt;\n"</span>;
+<a name="201" href="#201" id="201">201</a>     String fmUrlStr = <strong class="jxr_keyword">null</strong>, wmUrlStr = <strong class="jxr_keyword">null</strong>, rmUrlStr = <strong class="jxr_keyword">null</strong>;
+<a name="202" href="#202" id="202">202</a>     String crawlerXmlFilePath = <strong class="jxr_keyword">null</strong>, workflowStateXmlPath = <strong class="jxr_keyword">null</strong>;
+<a name="203" href="#203" id="203">203</a> 
+<a name="204" href="#204" id="204">204</a>     <strong class="jxr_keyword">if</strong> (args.length != 5) {
+<a name="205" href="#205" id="205">205</a>       System.err.println(usage);
+<a name="206" href="#206" id="206">206</a>       System.exit(1);
+<a name="207" href="#207" id="207">207</a>     }
+<a name="208" href="#208" id="208">208</a> 
+<a name="209" href="#209" id="209">209</a>     fmUrlStr = args[0];
+<a name="210" href="#210" id="210">210</a>     wmUrlStr = args[1];
+<a name="211" href="#211" id="211">211</a>     rmUrlStr = args[2];
+<a name="212" href="#212" id="212">212</a>     crawlerXmlFilePath = args[3];
+<a name="213" href="#213" id="213">213</a>     workflowStateXmlPath = args[4];
+<a name="214" href="#214" id="214">214</a> 
+<a name="215" href="#215" id="215">215</a>     <a href="../../../../../org/apache/oodt/pcs/tools/PCSHealthMonitor.html">PCSHealthMonitor</a> mon = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/tools/PCSHealthMonitor.html">PCSHealthMonitor</a>(fmUrlStr, wmUrlStr, rmUrlStr,
+<a name="216" href="#216" id="216">216</a>         crawlerXmlFilePath, workflowStateXmlPath);
+<a name="217" href="#217" id="217">217</a>     <strong class="jxr_keyword">try</strong> {
+<a name="218" href="#218" id="218">218</a>       mon.quickPrintMonitorToConsole();
+<a name="219" href="#219" id="219">219</a>     } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="220" href="#220" id="220">220</a>       e.printStackTrace();
+<a name="221" href="#221" id="221">221</a>     }
+<a name="222" href="#222" id="222">222</a>   }
+<a name="223" href="#223" id="223">223</a> 
+<a name="224" href="#224" id="224">224</a>   <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> getFileManagerStatus() {
+<a name="225" href="#225" id="225">225</a>     <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> fmStatus = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a>();
+<a name="226" href="#226" id="226">226</a> 
+<a name="227" href="#227" id="227">227</a>     fmStatus.setDaemonName(FILE_MANAGER_DAEMON_NAME);
+<a name="228" href="#228" id="228">228</a>     fmStatus.setStatus(printUp(getFmUp()));
+<a name="229" href="#229" id="229">229</a>     fmStatus.setUrlStr(<strong class="jxr_keyword">this</strong>.fm.getFmUrl().toString());
+<a name="230" href="#230" id="230">230</a> 
+<a name="231" href="#231" id="231">231</a>     <strong class="jxr_keyword">return</strong> fmStatus;
+<a name="232" href="#232" id="232">232</a>   }
+<a name="233" href="#233" id="233">233</a> 
+<a name="234" href="#234" id="234">234</a>   <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> getWorkflowManagerStatus() {
+<a name="235" href="#235" id="235">235</a>     <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> wmStatus = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a>();
+<a name="236" href="#236" id="236">236</a> 
+<a name="237" href="#237" id="237">237</a>     wmStatus.setDaemonName(WORKFLOW_MANAGER_DAEMON_NAME);
+<a name="238" href="#238" id="238">238</a>     wmStatus.setStatus(printUp(getWmUp()));
+<a name="239" href="#239" id="239">239</a>     wmStatus.setUrlStr(<strong class="jxr_keyword">this</strong>.wm.getWmUrl().toString());
+<a name="240" href="#240" id="240">240</a> 
+<a name="241" href="#241" id="241">241</a>     <strong class="jxr_keyword">return</strong> wmStatus;
+<a name="242" href="#242" id="242">242</a>   }
+<a name="243" href="#243" id="243">243</a> 
+<a name="244" href="#244" id="244">244</a>   <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> getResourceManagerStatus() {
+<a name="245" href="#245" id="245">245</a>     <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> rmStatus = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a>();
+<a name="246" href="#246" id="246">246</a> 
+<a name="247" href="#247" id="247">247</a>     rmStatus.setDaemonName(RESOURCE_MANAGER_DAEMON_NAME);
+<a name="248" href="#248" id="248">248</a>     rmStatus.setStatus(printUp(getRmUp()));
+<a name="249" href="#249" id="249">249</a>     rmStatus.setUrlStr(<strong class="jxr_keyword">this</strong>.rm.getResmgrUrl().toString());
+<a name="250" href="#250" id="250">250</a> 
+<a name="251" href="#251" id="251">251</a>     <strong class="jxr_keyword">return</strong> rmStatus;
+<a name="252" href="#252" id="252">252</a>   }
+<a name="253" href="#253" id="253">253</a> 
+<a name="254" href="#254" id="254">254</a>   <strong class="jxr_keyword">private</strong> List getBatchStubStatus() {
+<a name="255" href="#255" id="255">255</a>     List batchStubStatus = <strong class="jxr_keyword">new</strong> Vector();
+<a name="256" href="#256" id="256">256</a> 
+<a name="257" href="#257" id="257">257</a>     <strong class="jxr_keyword">if</strong> (getRmUp()) {
+<a name="258" href="#258" id="258">258</a>       <em class="jxr_comment">// only print if the resource manager is up</em>
+<a name="259" href="#259" id="259">259</a>       List resNodes = rm.safeGetResourceNodes();
+<a name="260" href="#260" id="260">260</a> 
+<a name="261" href="#261" id="261">261</a>       <strong class="jxr_keyword">if</strong> (resNodes != <strong class="jxr_keyword">null</strong> &amp;&amp; resNodes.size() &gt; 0) {
+<a name="262" href="#262" id="262">262</a>         <strong class="jxr_keyword">for</strong> (Iterator i = resNodes.iterator(); i.hasNext();) {
+<a name="263" href="#263" id="263">263</a>           <a href="../../../../../org/apache/oodt/cas/resource/structs/ResourceNode.html">ResourceNode</a> node = (ResourceNode) i.next();
+<a name="264" href="#264" id="264">264</a>           <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> batchStatus = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a>();
+<a name="265" href="#265" id="265">265</a>           batchStatus.setDaemonName(BATCH_STUB_DAEMON_NAME);
+<a name="266" href="#266" id="266">266</a>           batchStatus.setUrlStr(node.getIpAddr().toString());
+<a name="267" href="#267" id="267">267</a>           batchStatus.setStatus(printUp(getBatchStubUp(node)));
+<a name="268" href="#268" id="268">268</a>           batchStubStatus.add(batchStatus);
+<a name="269" href="#269" id="269">269</a>         }
+<a name="270" href="#270" id="270">270</a>       }
+<a name="271" href="#271" id="271">271</a>     }
+<a name="272" href="#272" id="272">272</a> 
+<a name="273" href="#273" id="273">273</a>     <strong class="jxr_keyword">return</strong> batchStubStatus;
+<a name="274" href="#274" id="274">274</a>   }
+<a name="275" href="#275" id="275">275</a> 
+<a name="276" href="#276" id="276">276</a>   <strong class="jxr_keyword">private</strong> List getCrawlerStatus() {
+<a name="277" href="#277" id="277">277</a>     List crawlers = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers();
+<a name="278" href="#278" id="278">278</a>     String crawlHost = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlHost();
+<a name="279" href="#279" id="279">279</a>     List statuses = <strong class="jxr_keyword">new</strong> Vector();
+<a name="280" href="#280" id="280">280</a> 
+<a name="281" href="#281" id="281">281</a>     <strong class="jxr_keyword">if</strong> (crawlers != <strong class="jxr_keyword">null</strong> &amp;&amp; crawlers.size() &gt; 0) {
+<a name="282" href="#282" id="282">282</a>       Collections.sort(crawlers, <strong class="jxr_keyword">new</strong> Comparator() {
+<a name="283" href="#283" id="283">283</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> compare(Object o1, Object o2) {
+<a name="284" href="#284" id="284">284</a>           <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> c1 = (CrawlInfo) o1;
+<a name="285" href="#285" id="285">285</a>           <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> c2 = (CrawlInfo) o2;
+<a name="286" href="#286" id="286">286</a> 
+<a name="287" href="#287" id="287">287</a>           <strong class="jxr_keyword">return</strong> c1.getCrawlerName().compareTo(c2.getCrawlerName());
+<a name="288" href="#288" id="288">288</a>         }
+<a name="289" href="#289" id="289">289</a> 
+<a name="290" href="#290" id="290">290</a>       });
+<a name="291" href="#291" id="291">291</a> 
+<a name="292" href="#292" id="292">292</a>       <strong class="jxr_keyword">for</strong> (Iterator i = crawlers.iterator(); i.hasNext();) {
+<a name="293" href="#293" id="293">293</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> info = (CrawlInfo) i.next();
+<a name="294" href="#294" id="294">294</a>         String crawlerUrlStr = <span class="jxr_string">"http://"</span> + crawlHost + <span class="jxr_string">":"</span>
+<a name="295" href="#295" id="295">295</a>             + info.getCrawlerPort();
+<a name="296" href="#296" id="296">296</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlerStatus.html">CrawlerStatus</a> status = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/CrawlerStatus.html">CrawlerStatus</a>();
+<a name="297" href="#297" id="297">297</a>         status.setInfo(info);
+<a name="298" href="#298" id="298">298</a>         status.setStatus(printUp(getCrawlerUp(crawlerUrlStr)));
+<a name="299" href="#299" id="299">299</a>         status.setCrawlHost(crawlHost);
+<a name="300" href="#300" id="300">300</a>         statuses.add(status);
+<a name="301" href="#301" id="301">301</a>       }
+<a name="302" href="#302" id="302">302</a>     }
+<a name="303" href="#303" id="303">303</a> 
+<a name="304" href="#304" id="304">304</a>     <strong class="jxr_keyword">return</strong> statuses;
+<a name="305" href="#305" id="305">305</a> 
+<a name="306" href="#306" id="306">306</a>   }
+<a name="307" href="#307" id="307">307</a> 
+<a name="308" href="#308" id="308">308</a>   <strong class="jxr_keyword">private</strong> List getProductHealth() {
+<a name="309" href="#309" id="309">309</a>     <strong class="jxr_keyword">if</strong> (getFmUp()) {
+<a name="310" href="#310" id="310">310</a>       <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">this</strong>.fm.safeGetTopNProducts(TOP_N_PRODUCTS);
+<a name="311" href="#311" id="311">311</a>     } <strong class="jxr_keyword">else</strong>
+<a name="312" href="#312" id="312">312</a>       <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> Vector();
+<a name="313" href="#313" id="313">313</a>   }
+<a name="314" href="#314" id="314">314</a> 
+<a name="315" href="#315" id="315">315</a>   <strong class="jxr_keyword">private</strong> List getJobStatusHealth() {
+<a name="316" href="#316" id="316">316</a>     <strong class="jxr_keyword">if</strong> (!getWmUp()) {
+<a name="317" href="#317" id="317">317</a>       <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> Vector();
+<a name="318" href="#318" id="318">318</a>     }
+<a name="319" href="#319" id="319">319</a> 
+<a name="320" href="#320" id="320">320</a>     List statuses = <strong class="jxr_keyword">new</strong> Vector();
+<a name="321" href="#321" id="321">321</a>     List states = <strong class="jxr_keyword">this</strong>.statesFile.getStates();
+<a name="322" href="#322" id="322">322</a> 
+<a name="323" href="#323" id="323">323</a>     <strong class="jxr_keyword">if</strong> (states != <strong class="jxr_keyword">null</strong> &amp;&amp; states.size() &gt; 0) {
+<a name="324" href="#324" id="324">324</a>       <strong class="jxr_keyword">for</strong> (Iterator i = states.iterator(); i.hasNext();) {
+<a name="325" href="#325" id="325">325</a>         String state = (String) i.next();
+<a name="326" href="#326" id="326">326</a>         <strong class="jxr_keyword">int</strong> numPipelines = <strong class="jxr_keyword">this</strong>.wm.safeGetNumWorkflowInstancesByStatus(state);
+<a name="327" href="#327" id="327">327</a>         <strong class="jxr_keyword">if</strong> (numPipelines == -1) {
+<a name="328" href="#328" id="328">328</a>           numPipelines = 0;
+<a name="329" href="#329" id="329">329</a>         }
+<a name="330" href="#330" id="330">330</a> 
+<a name="331" href="#331" id="331">331</a>         <a href="../../../../../org/apache/oodt/pcs/health/JobHealthStatus.html">JobHealthStatus</a> jobStatus = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/JobHealthStatus.html">JobHealthStatus</a>();
+<a name="332" href="#332" id="332">332</a>         jobStatus.setStatus(state);
+<a name="333" href="#333" id="333">333</a>         jobStatus.setNumPipelines(numPipelines);
+<a name="334" href="#334" id="334">334</a>         statuses.add(jobStatus);
+<a name="335" href="#335" id="335">335</a>       }
+<a name="336" href="#336" id="336">336</a>     }
+<a name="337" href="#337" id="337">337</a> 
+<a name="338" href="#338" id="338">338</a>     <strong class="jxr_keyword">return</strong> statuses;
+<a name="339" href="#339" id="339">339</a>   }
+<a name="340" href="#340" id="340">340</a> 
+<a name="341" href="#341" id="341">341</a>   <strong class="jxr_keyword">private</strong> List getIngestHealth() {
+<a name="342" href="#342" id="342">342</a>     <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers() == <strong class="jxr_keyword">null</strong>) {
+<a name="343" href="#343" id="343">343</a>       <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> Vector();
+<a name="344" href="#344" id="344">344</a>     }
+<a name="345" href="#345" id="345">345</a> 
+<a name="346" href="#346" id="346">346</a>     List statuses = <strong class="jxr_keyword">new</strong> Vector();
+<a name="347" href="#347" id="347">347</a> 
+<a name="348" href="#348" id="348">348</a>     <strong class="jxr_keyword">for</strong> (Iterator i = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers().iterator(); i.hasNext();) {
+<a name="349" href="#349" id="349">349</a>       <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> info = (CrawlInfo) i.next();
+<a name="350" href="#350" id="350">350</a>       String crawlUrlStr = <span class="jxr_string">"http://"</span> + <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlHost() + <span class="jxr_string">":"</span>
+<a name="351" href="#351" id="351">351</a>           + info.getCrawlerPort();
+<a name="352" href="#352" id="352">352</a>       <strong class="jxr_keyword">try</strong> {
+<a name="353" href="#353" id="353">353</a>         <a href="../../../../../org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.html">CrawlDaemonController</a> controller = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.html">CrawlDaemonController</a>(
+<a name="354" href="#354" id="354">354</a>             crawlUrlStr);
+<a name="355" href="#355" id="355">355</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlerHealth.html">CrawlerHealth</a> health = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/CrawlerHealth.html">CrawlerHealth</a>();
+<a name="356" href="#356" id="356">356</a>         health.setCrawlerName(info.getCrawlerName());
+<a name="357" href="#357" id="357">357</a>         health.setNumCrawls(controller.getNumCrawls());
+<a name="358" href="#358" id="358">358</a>         health
+<a name="359" href="#359" id="359">359</a>             .setAvgCrawlTime((<strong class="jxr_keyword">double</strong>) (controller.getAverageCrawlTime() / 1000.0));
+<a name="360" href="#360" id="360">360</a>         statuses.add(health);
+<a name="361" href="#361" id="361">361</a> 
+<a name="362" href="#362" id="362">362</a>       } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="363" href="#363" id="363">363</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlerHealth.html">CrawlerHealth</a> health = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/pcs/health/CrawlerHealth.html">CrawlerHealth</a>();
+<a name="364" href="#364" id="364">364</a>         health.setCrawlerName(info.getCrawlerName());
+<a name="365" href="#365" id="365">365</a>         health.setNumCrawls(CRAWLER_DOWN_INT);
+<a name="366" href="#366" id="366">366</a>         health.setAvgCrawlTime(CRAWLER_DOWN_DOUBLE);
+<a name="367" href="#367" id="367">367</a>         statuses.add(health);
+<a name="368" href="#368" id="368">368</a>       }
+<a name="369" href="#369" id="369">369</a> 
+<a name="370" href="#370" id="370">370</a>     }
+<a name="371" href="#371" id="371">371</a> 
+<a name="372" href="#372" id="372">372</a>     <strong class="jxr_keyword">return</strong> statuses;
+<a name="373" href="#373" id="373">373</a>   }
+<a name="374" href="#374" id="374">374</a> 
+<a name="375" href="#375" id="375">375</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> printIngestStatusHealth(<a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report) {
+<a name="376" href="#376" id="376">376</a>     <strong class="jxr_keyword">if</strong> (report.getCrawlerHealthStatus() != <strong class="jxr_keyword">null</strong>
+<a name="377" href="#377" id="377">377</a>         &amp;&amp; report.getCrawlerHealthStatus().size() &gt; 0) {
+<a name="378" href="#378" id="378">378</a>       <strong class="jxr_keyword">for</strong> (Iterator i = report.getCrawlerHealthStatus().iterator(); i.hasNext();) {
+<a name="379" href="#379" id="379">379</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlerHealth.html">CrawlerHealth</a> health = (CrawlerHealth) i.next();
+<a name="380" href="#380" id="380">380</a>         System.out.print(health.getCrawlerName() + <span class="jxr_string">":"</span>);
+<a name="381" href="#381" id="381">381</a>         <strong class="jxr_keyword">if</strong> (health.getNumCrawls() == CRAWLER_DOWN_INT) {
+<a name="382" href="#382" id="382">382</a>           System.out.println(<span class="jxr_string">" DOWN"</span>);
+<a name="383" href="#383" id="383">383</a>         } <strong class="jxr_keyword">else</strong> {
+<a name="384" href="#384" id="384">384</a>           System.out.println(<span class="jxr_string">""</span>);
+<a name="385" href="#385" id="385">385</a>           System.out.println(<span class="jxr_string">"Number of Crawls: "</span> + health.getNumCrawls());
+<a name="386" href="#386" id="386">386</a>           System.out.println(<span class="jxr_string">"Average Crawl Time (seconds): "</span>
+<a name="387" href="#387" id="387">387</a>               + health.getAvgCrawlTime());
+<a name="388" href="#388" id="388">388</a>           System.out.println(<span class="jxr_string">""</span>);
+<a name="389" href="#389" id="389">389</a>         }
+<a name="390" href="#390" id="390">390</a> 
+<a name="391" href="#391" id="391">391</a>       }
+<a name="392" href="#392" id="392">392</a> 
+<a name="393" href="#393" id="393">393</a>     }
+<a name="394" href="#394" id="394">394</a>   }
+<a name="395" href="#395" id="395">395</a> 
+<a name="396" href="#396" id="396">396</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> printJobStatusHealth(<a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report) {
+<a name="397" href="#397" id="397">397</a>     <strong class="jxr_keyword">if</strong> (report.getJobHealthStatus() != <strong class="jxr_keyword">null</strong>
+<a name="398" href="#398" id="398">398</a>         &amp;&amp; report.getJobHealthStatus().size() &gt; 0) {
+<a name="399" href="#399" id="399">399</a>       <strong class="jxr_keyword">for</strong> (Iterator i = report.getJobHealthStatus().iterator(); i.hasNext();) {
+<a name="400" href="#400" id="400">400</a>         <a href="../../../../../org/apache/oodt/pcs/health/JobHealthStatus.html">JobHealthStatus</a> status = (JobHealthStatus) i.next();
+<a name="401" href="#401" id="401">401</a>         System.out.println(status.getNumPipelines() + <span class="jxr_string">" pipelines "</span>
+<a name="402" href="#402" id="402">402</a>             + status.getStatus());
+<a name="403" href="#403" id="403">403</a>       }
+<a name="404" href="#404" id="404">404</a>     }
+<a name="405" href="#405" id="405">405</a>   }
+<a name="406" href="#406" id="406">406</a> 
+<a name="407" href="#407" id="407">407</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> printProductHealth(<a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report) {
+<a name="408" href="#408" id="408">408</a>     <strong class="jxr_keyword">if</strong> (report.getLatestProductsIngested() != <strong class="jxr_keyword">null</strong>
+<a name="409" href="#409" id="409">409</a>         &amp;&amp; report.getLatestProductsIngested().size() &gt; 0) {
+<a name="410" href="#410" id="410">410</a>       System.out.println(<span class="jxr_string">"Latest "</span> + TOP_N_PRODUCTS + <span class="jxr_string">" products ingested:"</span>);
+<a name="411" href="#411" id="411">411</a>       <strong class="jxr_keyword">for</strong> (Iterator i = report.getLatestProductsIngested().iterator(); i
+<a name="412" href="#412" id="412">412</a>           .hasNext();) {
+<a name="413" href="#413" id="413">413</a>         <a href="../../../../../org/apache/oodt/cas/filemgr/structs/Product.html">Product</a> p = (Product) i.next();
+<a name="414" href="#414" id="414">414</a>         p.setProductType(fm.safeGetProductTypeById(p.getProductType()
+<a name="415" href="#415" id="415">415</a>             .getProductTypeId()));
+<a name="416" href="#416" id="416">416</a>         p.setProductReferences(fm.safeGetProductReferences(p));
+<a name="417" href="#417" id="417">417</a>         <a href="../../../../../org/apache/oodt/cas/metadata/Metadata.html">Metadata</a> prodMet = fm.safeGetMetadata(p);
+<a name="418" href="#418" id="418">418</a>         System.out.println(fm.getFilePath(p) + <span class="jxr_string">" at: "</span>
+<a name="419" href="#419" id="419">419</a>             + prodMet.getMetadata(<span class="jxr_string">"CAS."</span> + PRODUCT_RECEVIED_TIME));
+<a name="420" href="#420" id="420">420</a>       }
+<a name="421" href="#421" id="421">421</a> 
+<a name="422" href="#422" id="422">422</a>     }
+<a name="423" href="#423" id="423">423</a>   }
+<a name="424" href="#424" id="424">424</a> 
+<a name="425" href="#425" id="425">425</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> printBatchStubs(<a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report) {
+<a name="426" href="#426" id="426">426</a>     <strong class="jxr_keyword">if</strong> (report.getBatchStubStatus() != <strong class="jxr_keyword">null</strong>
+<a name="427" href="#427" id="427">427</a>         &amp;&amp; report.getBatchStubStatus().size() &gt; 0) {
+<a name="428" href="#428" id="428">428</a>       <strong class="jxr_keyword">for</strong> (Iterator i = report.getBatchStubStatus().iterator(); i.hasNext();) {
+<a name="429" href="#429" id="429">429</a>         <a href="../../../../../org/apache/oodt/pcs/health/PCSDaemonStatus.html">PCSDaemonStatus</a> batchStatus = (PCSDaemonStatus) i.next();
+<a name="430" href="#430" id="430">430</a>         System.out.println(<span class="jxr_string">"&gt; "</span> + batchStatus.getDaemonName() + <span class="jxr_string">": ["</span>
+<a name="431" href="#431" id="431">431</a>             + batchStatus.getUrlStr() + <span class="jxr_string">"]: "</span> + batchStatus.getStatus());
+<a name="432" href="#432" id="432">432</a>       }
+<a name="433" href="#433" id="433">433</a> 
+<a name="434" href="#434" id="434">434</a>     }
+<a name="435" href="#435" id="435">435</a>   }
+<a name="436" href="#436" id="436">436</a> 
+<a name="437" href="#437" id="437">437</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> printCrawlers(<a href="../../../../../org/apache/oodt/pcs/health/PCSHealthMonitorReport.html">PCSHealthMonitorReport</a> report) {
+<a name="438" href="#438" id="438">438</a>     <strong class="jxr_keyword">if</strong> (report.getCrawlerStatus() != <strong class="jxr_keyword">null</strong>
+<a name="439" href="#439" id="439">439</a>         &amp;&amp; report.getCrawlerStatus().size() &gt; 0) {
+<a name="440" href="#440" id="440">440</a>       List crawlers = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers();
+<a name="441" href="#441" id="441">441</a>       String biggestString = getBiggestString(crawlers);
+<a name="442" href="#442" id="442">442</a> 
+<a name="443" href="#443" id="443">443</a>       <strong class="jxr_keyword">for</strong> (Iterator i = report.getCrawlerStatus().iterator(); i.hasNext();) {
+<a name="444" href="#444" id="444">444</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlerStatus.html">CrawlerStatus</a> status = (CrawlerStatus) i.next();
+<a name="445" href="#445" id="445">445</a>         String crawlerUrlStr = <span class="jxr_string">"http://"</span> + status.getCrawlHost() + <span class="jxr_string">":"</span>
+<a name="446" href="#446" id="446">446</a>             + status.getInfo().getCrawlerPort();
+<a name="447" href="#447" id="447">447</a>         System.out.println(getStrPadding(status.getInfo().getCrawlerName(),
+<a name="448" href="#448" id="448">448</a>             biggestString)
+<a name="449" href="#449" id="449">449</a>             + status.getInfo().getCrawlerName()
+<a name="450" href="#450" id="450">450</a>             + <span class="jxr_string">": ["</span>
+<a name="451" href="#451" id="451">451</a>             + crawlerUrlStr
+<a name="452" href="#452" id="452">452</a>             + <span class="jxr_string">"]: "</span>
+<a name="453" href="#453" id="453">453</a>             + status.getStatus());
+<a name="454" href="#454" id="454">454</a>       }
+<a name="455" href="#455" id="455">455</a> 
+<a name="456" href="#456" id="456">456</a>     }
+<a name="457" href="#457" id="457">457</a> 
+<a name="458" href="#458" id="458">458</a>   }
+<a name="459" href="#459" id="459">459</a> 
+<a name="460" href="#460" id="460">460</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> quickPrintCrawlers() {
+<a name="461" href="#461" id="461">461</a>     List crawlers = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers();
+<a name="462" href="#462" id="462">462</a>     String crawlHost = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlHost();
+<a name="463" href="#463" id="463">463</a> 
+<a name="464" href="#464" id="464">464</a>     <strong class="jxr_keyword">if</strong> (crawlers != <strong class="jxr_keyword">null</strong> &amp;&amp; crawlers.size() &gt; 0) {
+<a name="465" href="#465" id="465">465</a>       Collections.sort(crawlers, <strong class="jxr_keyword">new</strong> Comparator() {
+<a name="466" href="#466" id="466">466</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> compare(Object o1, Object o2) {
+<a name="467" href="#467" id="467">467</a>           <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> c1 = (CrawlInfo) o1;
+<a name="468" href="#468" id="468">468</a>           <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> c2 = (CrawlInfo) o2;
+<a name="469" href="#469" id="469">469</a> 
+<a name="470" href="#470" id="470">470</a>           <strong class="jxr_keyword">return</strong> c1.getCrawlerName().compareTo(c2.getCrawlerName());
+<a name="471" href="#471" id="471">471</a>         }
+<a name="472" href="#472" id="472">472</a> 
+<a name="473" href="#473" id="473">473</a>       });
+<a name="474" href="#474" id="474">474</a> 
+<a name="475" href="#475" id="475">475</a>       String biggestString = getBiggestString(crawlers);
+<a name="476" href="#476" id="476">476</a>       <strong class="jxr_keyword">for</strong> (Iterator i = crawlers.iterator(); i.hasNext();) {
+<a name="477" href="#477" id="477">477</a>         <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> info = (CrawlInfo) i.next();
+<a name="478" href="#478" id="478">478</a>         String crawlerUrlStr = <span class="jxr_string">"http://"</span> + crawlHost + <span class="jxr_string">":"</span>
+<a name="479" href="#479" id="479">479</a>             + info.getCrawlerPort();
+<a name="480" href="#480" id="480">480</a>         System.out.println(getStrPadding(info.getCrawlerName(), biggestString)
+<a name="481" href="#481" id="481">481</a>             + info.getCrawlerName() + <span class="jxr_string">": ["</span> + crawlerUrlStr + <span class="jxr_string">"]: "</span>
+<a name="482" href="#482" id="482">482</a>             + printUp(getCrawlerUp(crawlerUrlStr)));
+<a name="483" href="#483" id="483">483</a>       }
+<a name="484" href="#484" id="484">484</a>     }
+<a name="485" href="#485" id="485">485</a> 
+<a name="486" href="#486" id="486">486</a>   }
+<a name="487" href="#487" id="487">487</a> 
+<a name="488" href="#488" id="488">488</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> quickPrintBatchStubs() {
+<a name="489" href="#489" id="489">489</a>     List resNodes = <strong class="jxr_keyword">null</strong>;
+<a name="490" href="#490" id="490">490</a> 
+<a name="491" href="#491" id="491">491</a>     <strong class="jxr_keyword">if</strong> (getRmUp()) {
+<a name="492" href="#492" id="492">492</a>       <em class="jxr_comment">// only print if the resource manager is up</em>
+<a name="493" href="#493" id="493">493</a>       resNodes = rm.safeGetResourceNodes();
+<a name="494" href="#494" id="494">494</a> 
+<a name="495" href="#495" id="495">495</a>       <strong class="jxr_keyword">if</strong> (resNodes != <strong class="jxr_keyword">null</strong> &amp;&amp; resNodes.size() &gt; 0) {
+<a name="496" href="#496" id="496">496</a>         <strong class="jxr_keyword">for</strong> (Iterator i = resNodes.iterator(); i.hasNext();) {
+<a name="497" href="#497" id="497">497</a>           <a href="../../../../../org/apache/oodt/cas/resource/structs/ResourceNode.html">ResourceNode</a> node = (ResourceNode) i.next();
+<a name="498" href="#498" id="498">498</a>           System.out.println(<span class="jxr_string">"&gt; "</span> + BATCH_STUB_DAEMON_NAME + <span class="jxr_string">": ["</span>
+<a name="499" href="#499" id="499">499</a>               + node.getIpAddr() + <span class="jxr_string">"]: "</span> + printUp(getBatchStubUp(node)));
+<a name="500" href="#500" id="500">500</a>         }
+<a name="501" href="#501" id="501">501</a>       }
+<a name="502" href="#502" id="502">502</a>     }
+<a name="503" href="#503" id="503">503</a>   }
+<a name="504" href="#504" id="504">504</a> 
+<a name="505" href="#505" id="505">505</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> quickPrintJobStatusHealth() {
+<a name="506" href="#506" id="506">506</a>     <strong class="jxr_keyword">if</strong> (!getWmUp()) {
+<a name="507" href="#507" id="507">507</a>       <strong class="jxr_keyword">return</strong>;
+<a name="508" href="#508" id="508">508</a>     }
+<a name="509" href="#509" id="509">509</a> 
+<a name="510" href="#510" id="510">510</a>     List states = <strong class="jxr_keyword">this</strong>.statesFile.getStates();
+<a name="511" href="#511" id="511">511</a> 
+<a name="512" href="#512" id="512">512</a>     <strong class="jxr_keyword">if</strong> (states != <strong class="jxr_keyword">null</strong> &amp;&amp; states.size() &gt; 0) {
+<a name="513" href="#513" id="513">513</a>       <strong class="jxr_keyword">for</strong> (Iterator i = states.iterator(); i.hasNext();) {
+<a name="514" href="#514" id="514">514</a>         String state = (String) i.next();
+<a name="515" href="#515" id="515">515</a>         <strong class="jxr_keyword">int</strong> numPipelines = <strong class="jxr_keyword">this</strong>.wm.safeGetNumWorkflowInstancesByStatus(state);
+<a name="516" href="#516" id="516">516</a>         <strong class="jxr_keyword">if</strong> (numPipelines == -1) {
+<a name="517" href="#517" id="517">517</a>           numPipelines = 0;
+<a name="518" href="#518" id="518">518</a>         }
+<a name="519" href="#519" id="519">519</a>         System.out.println(numPipelines + <span class="jxr_string">" pipelines "</span> + state);
+<a name="520" href="#520" id="520">520</a> 
+<a name="521" href="#521" id="521">521</a>       }
+<a name="522" href="#522" id="522">522</a>     }
+<a name="523" href="#523" id="523">523</a>   }
+<a name="524" href="#524" id="524">524</a> 
+<a name="525" href="#525" id="525">525</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> quickPrintProductHealth() {
+<a name="526" href="#526" id="526">526</a>     <strong class="jxr_keyword">if</strong> (getFmUp()) {
+<a name="527" href="#527" id="527">527</a>       System.out.println(<span class="jxr_string">"Latest "</span> + TOP_N_PRODUCTS + <span class="jxr_string">" products ingested:"</span>);
+<a name="528" href="#528" id="528">528</a> 
+<a name="529" href="#529" id="529">529</a>       List prods = <strong class="jxr_keyword">this</strong>.fm.safeGetTopNProducts(TOP_N_PRODUCTS);
+<a name="530" href="#530" id="530">530</a> 
+<a name="531" href="#531" id="531">531</a>       <strong class="jxr_keyword">if</strong> (prods != <strong class="jxr_keyword">null</strong> &amp;&amp; prods.size() &gt; 0) {
+<a name="532" href="#532" id="532">532</a>         <strong class="jxr_keyword">for</strong> (Iterator i = prods.iterator(); i.hasNext();) {
+<a name="533" href="#533" id="533">533</a>           <a href="../../../../../org/apache/oodt/cas/filemgr/structs/Product.html">Product</a> p = (Product) i.next();
+<a name="534" href="#534" id="534">534</a>           p.setProductType(fm.safeGetProductTypeById(p.getProductType()
+<a name="535" href="#535" id="535">535</a>               .getProductTypeId()));
+<a name="536" href="#536" id="536">536</a>           p.setProductReferences(fm.safeGetProductReferences(p));
+<a name="537" href="#537" id="537">537</a>           <a href="../../../../../org/apache/oodt/cas/metadata/Metadata.html">Metadata</a> prodMet = fm.safeGetMetadata(p);
+<a name="538" href="#538" id="538">538</a>           System.out.println(fm.getFilePath(p) + <span class="jxr_string">" at: "</span>
+<a name="539" href="#539" id="539">539</a>               + prodMet.getMetadata(<span class="jxr_string">"CAS."</span> + PRODUCT_RECEVIED_TIME));
+<a name="540" href="#540" id="540">540</a>         }
+<a name="541" href="#541" id="541">541</a>       }
+<a name="542" href="#542" id="542">542</a> 
+<a name="543" href="#543" id="543">543</a>     }
+<a name="544" href="#544" id="544">544</a>   }
+<a name="545" href="#545" id="545">545</a> 
+<a name="546" href="#546" id="546">546</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> quickPrintIngestStatusHealth() {
+<a name="547" href="#547" id="547">547</a>     <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers() == <strong class="jxr_keyword">null</strong>) {
+<a name="548" href="#548" id="548">548</a>       <strong class="jxr_keyword">return</strong>;
+<a name="549" href="#549" id="549">549</a>     }
+<a name="550" href="#550" id="550">550</a> 
+<a name="551" href="#551" id="551">551</a>     <strong class="jxr_keyword">for</strong> (Iterator i = <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlers().iterator(); i.hasNext();) {
+<a name="552" href="#552" id="552">552</a>       <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> info = (CrawlInfo) i.next();
+<a name="553" href="#553" id="553">553</a>       String crawlUrlStr = <span class="jxr_string">"http://"</span> + <strong class="jxr_keyword">this</strong>.crawlProps.getCrawlHost() + <span class="jxr_string">":"</span>
+<a name="554" href="#554" id="554">554</a>           + info.getCrawlerPort();
+<a name="555" href="#555" id="555">555</a>       <strong class="jxr_keyword">try</strong> {
+<a name="556" href="#556" id="556">556</a>         <a href="../../../../../org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.html">CrawlDaemonController</a> controller = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.html">CrawlDaemonController</a>(
+<a name="557" href="#557" id="557">557</a>             crawlUrlStr);
+<a name="558" href="#558" id="558">558</a>         System.out.println(info.getCrawlerName() + <span class="jxr_string">":"</span>);
+<a name="559" href="#559" id="559">559</a>         System.out.println(<span class="jxr_string">"Number of Crawls: "</span> + controller.getNumCrawls());
+<a name="560" href="#560" id="560">560</a>         System.out.println(<span class="jxr_string">"Average Crawl Time (seconds): "</span>
+<a name="561" href="#561" id="561">561</a>             + (<strong class="jxr_keyword">double</strong>) (controller.getAverageCrawlTime() / 1000.0));
+<a name="562" href="#562" id="562">562</a>         System.out.println(<span class="jxr_string">""</span>);
+<a name="563" href="#563" id="563">563</a> 
+<a name="564" href="#564" id="564">564</a>       } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="565" href="#565" id="565">565</a>         System.out.println(info.getCrawlerName() + <span class="jxr_string">": DOWN"</span>);
+<a name="566" href="#566" id="566">566</a>       }
+<a name="567" href="#567" id="567">567</a> 
+<a name="568" href="#568" id="568">568</a>     }
+<a name="569" href="#569" id="569">569</a>   }
+<a name="570" href="#570" id="570">570</a> 
+<a name="571" href="#571" id="571">571</a>   <strong class="jxr_keyword">private</strong> String getBiggestString(List crawlInfos) {
+<a name="572" href="#572" id="572">572</a>     <strong class="jxr_keyword">int</strong> biggestStrSz = Integer.MIN_VALUE;
+<a name="573" href="#573" id="573">573</a>     String biggestStr = <strong class="jxr_keyword">null</strong>;
+<a name="574" href="#574" id="574">574</a> 
+<a name="575" href="#575" id="575">575</a>     <strong class="jxr_keyword">for</strong> (Iterator i = crawlInfos.iterator(); i.hasNext();) {
+<a name="576" href="#576" id="576">576</a>       <a href="../../../../../org/apache/oodt/pcs/health/CrawlInfo.html">CrawlInfo</a> info = (CrawlInfo) i.next();
+<a name="577" href="#577" id="577">577</a>       String crawlInfoName = info.getCrawlerName();
+<a name="578" href="#578" id="578">578</a>       <strong class="jxr_keyword">if</strong> (crawlInfoName.length() &gt; biggestStrSz) {
+<a name="579" href="#579" id="579">579</a>         biggestStr = crawlInfoName;
+<a name="580" href="#580" id="580">580</a>         biggestStrSz = biggestStr.length();
+<a name="581" href="#581" id="581">581</a>       }
+<a name="582" href="#582" id="582">582</a>     }
+<a name="583" href="#583" id="583">583</a> 
+<a name="584" href="#584" id="584">584</a>     <strong class="jxr_keyword">return</strong> biggestStr;
+<a name="585" href="#585" id="585">585</a>   }
+<a name="586" href="#586" id="586">586</a> 
+<a name="587" href="#587" id="587">587</a>   <strong class="jxr_keyword">private</strong> String getStrPadding(String initString, String compareString) {
+<a name="588" href="#588" id="588">588</a>     <strong class="jxr_keyword">int</strong> sizeInitStr = initString.length();
+<a name="589" href="#589" id="589">589</a>     <strong class="jxr_keyword">int</strong> sizeCompareStr = compareString.length();
+<a name="590" href="#590" id="590">590</a> 
+<a name="591" href="#591" id="591">591</a>     <strong class="jxr_keyword">int</strong> diff = Math.abs(sizeInitStr - sizeCompareStr);
+<a name="592" href="#592" id="592">592</a>     StringBuffer buf = <strong class="jxr_keyword">new</strong> StringBuffer();
+<a name="593" href="#593" id="593">593</a>     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; diff; i++) {
+<a name="594" href="#594" id="594">594</a>       buf.append(<span class="jxr_string">" "</span>);
+<a name="595" href="#595" id="595">595</a>     }
+<a name="596" href="#596" id="596">596</a> 
+<a name="597" href="#597" id="597">597</a>     <strong class="jxr_keyword">return</strong> buf.toString();
+<a name="598" href="#598" id="598">598</a>   }
+<a name="599" href="#599" id="599">599</a> 
+<a name="600" href="#600" id="600">600</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> getBatchStubUp(<a href="../../../../../org/apache/oodt/cas/resource/structs/ResourceNode.html">ResourceNode</a> node) {
+<a name="601" href="#601" id="601">601</a>     XmlRpcClient client = <strong class="jxr_keyword">new</strong> XmlRpcClient(node.getIpAddr());
+<a name="602" href="#602" id="602">602</a>     Vector argList = <strong class="jxr_keyword">new</strong> Vector();
+<a name="603" href="#603" id="603">603</a> 
+<a name="604" href="#604" id="604">604</a>     <strong class="jxr_keyword">try</strong> {
+<a name="605" href="#605" id="605">605</a>       <strong class="jxr_keyword">return</strong> ((Boolean) client.execute(<span class="jxr_string">"batchstub.isAlive"</span>, argList))
+<a name="606" href="#606" id="606">606</a>           .booleanValue();
+<a name="607" href="#607" id="607">607</a>     } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="608" href="#608" id="608">608</a>       <strong class="jxr_keyword">return</strong> false;
+<a name="609" href="#609" id="609">609</a>     }
+<a name="610" href="#610" id="610">610</a>   }
+<a name="611" href="#611" id="611">611</a> 
+<a name="612" href="#612" id="612">612</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> getCrawlerUp(String crawlUrlStr) {
+<a name="613" href="#613" id="613">613</a>     <a href="../../../../../org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.html">CrawlDaemonController</a> controller = <strong class="jxr_keyword">null</strong>;
+<a name="614" href="#614" id="614">614</a> 
+<a name="615" href="#615" id="615">615</a>     <strong class="jxr_keyword">try</strong> {
+<a name="616" href="#616" id="616">616</a>       controller = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.html">CrawlDaemonController</a>(crawlUrlStr);
+<a name="617" href="#617" id="617">617</a>       <strong class="jxr_keyword">return</strong> controller.isRunning();
+<a name="618" href="#618" id="618">618</a>     } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="619" href="#619" id="619">619</a>       <strong class="jxr_keyword">return</strong> false;
+<a name="620" href="#620" id="620">620</a>     }
+<a name="621" href="#621" id="621">621</a>   }
+<a name="622" href="#622" id="622">622</a> 
+<a name="623" href="#623" id="623">623</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> getFmUp() {
+<a name="624" href="#624" id="624">624</a>     <strong class="jxr_keyword">return</strong> fm.getFmgrClient() != <strong class="jxr_keyword">null</strong> ? fm.getFmgrClient().isAlive() : false;
+<a name="625" href="#625" id="625">625</a>   }
+<a name="626" href="#626" id="626">626</a> 
+<a name="627" href="#627" id="627">627</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> getWmUp() {
+<a name="628" href="#628" id="628">628</a>     <strong class="jxr_keyword">try</strong> {
+<a name="629" href="#629" id="629">629</a>       wm.getClient().getRegisteredEvents();
+<a name="630" href="#630" id="630">630</a>       <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a name="631" href="#631" id="631">631</a>     } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="632" href="#632" id="632">632</a>       <strong class="jxr_keyword">return</strong> false;
+<a name="633" href="#633" id="633">633</a>     }
+<a name="634" href="#634" id="634">634</a>   }
+<a name="635" href="#635" id="635">635</a> 
+<a name="636" href="#636" id="636">636</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> getRmUp() {
+<a name="637" href="#637" id="637">637</a>     <strong class="jxr_keyword">try</strong> {
+<a name="638" href="#638" id="638">638</a>       rm.getClient().getNodes();
+<a name="639" href="#639" id="639">639</a>       <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a name="640" href="#640" id="640">640</a>     } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="641" href="#641" id="641">641</a>       <strong class="jxr_keyword">return</strong> false;
+<a name="642" href="#642" id="642">642</a>     }
+<a name="643" href="#643" id="643">643</a>   }
+<a name="644" href="#644" id="644">644</a> 
+<a name="645" href="#645" id="645">645</a>   <strong class="jxr_keyword">private</strong> String printUp(<strong class="jxr_keyword">boolean</strong> upFlag) {
+<a name="646" href="#646" id="646">646</a>     <strong class="jxr_keyword">return</strong> upFlag ? STATUS_UP : STATUS_DOWN;
+<a name="647" href="#647" id="647">647</a>   }
+<a name="648" href="#648" id="648">648</a> 
+<a name="649" href="#649" id="649">649</a> }
+</pre>
+<hr /><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body></html>
\ No newline at end of file