You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2007/01/27 16:59:42 UTC

svn commit: r500555 - in /tomcat/connectors/trunk/jk: jkstatus/src/share/org/apache/jk/status/ native/common/ xdocs/miscellaneous/

Author: rjung
Date: Sat Jan 27 07:59:41 2007
New Revision: 500555

URL: http://svn.apache.org/viewvc?view=rev&rev=500555
Log:
Add estimated time until next global maintenance to xml/txt/property
mime types in status worker and adopt jkstatus ant task.

Modified:
    tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancer.java
    tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java
    tomcat/connectors/trunk/jk/native/common/jk_status.c
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/jkstatustasks.xml

Modified: tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancer.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancer.java?view=diff&rev=500555&r1=500554&r2=500555
==============================================================================
--- tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancer.java (original)
+++ tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkBalancer.java Sat Jan 27 07:59:41 2007
@@ -43,6 +43,8 @@
     int max_busy = -1 ;
     int member_count = -1 ;
     int map_count = -1 ;
+    int time_to_maintenance_min = -1 ;
+    int time_to_maintenance_max = -1 ;
        
     List members = new ArrayList() ;
     List mappings = new ArrayList() ;
@@ -167,135 +169,167 @@
     public void setType(String type) {
         this.type = type;
     }
-	/**
-	 * @return the bad
+    /**
+     * @return the bad
+     * @since mod_jk 1.2.20
+     */
+    public int getBad() {
+        return bad;
+    }
+    /**
+     * @param bad the bad to set
+     * @since mod_jk 1.2.20
+     */
+    public void setBad(int bad) {
+        this.bad = bad;
+    }
+    /**
+     * @return the busy
+     * @since mod_jk 1.2.20
+     */
+    public int getBusy() {
+        return busy;
+    }
+    /**
+     * @param busy the busy to set
+     * @since mod_jk 1.2.20
+     */
+    public void setBusy(int busy) {
+        this.busy = busy;
+    }
+    /**
+     * @return the degraded
+     * @since mod_jk 1.2.20
+     */
+    public int getDegraded() {
+        return degraded;
+    }
+    /**
+     * @param degraded the degraded to set
+     * @since mod_jk 1.2.20
+     */
+    public void setDegraded(int degraded) {
+        this.degraded = degraded;
+    }
+    /**
+     * @return the good
+     * @since mod_jk 1.2.20
+     */
+    public int getGood() {
+        return good;
+    }
+    /**
+     * @param good the good to set
+     * @since mod_jk 1.2.20
+     */
+    public void setGood(int good) {
+        this.good = good;
+    }
+    /**
+     * @return the lock
+     * @since mod_jk 1.2.20
+     */
+    public String getLock() {
+        return lock;
+    }
+    /**
+     * @param lock the lock to set
+     * @since mod_jk 1.2.20
+     */
+    public void setLock(String lock) {
+        this.lock = lock;
+    }
+    /**
+     * @return the max_busy
+     * @since mod_jk 1.2.20
+     */
+    public int getMax_busy() {
+        return max_busy;
+    }
+    /**
+     * @param max_busy the max_busy to set
+     * @since mod_jk 1.2.20
+     */
+    public void setMax_busy(int max_busy) {
+        this.max_busy = max_busy;
+    }
+    /**
+     * @return the method
+     * @since mod_jk 1.2.20
+     */
+    public String getMethod() {
+        return method;
+    }
+    /**
+     * @param method the method to set
+     * @since mod_jk 1.2.20
+     */
+    public void setMethod(String method) {
+        this.method = method;
+    }
+    
+    /**
+     * @return the member_count
+     * @since mod_jk 1.2.20
+     */
+    public int getMember_count() {
+        return member_count;
+    }
+    
+    /**
+     * @param member_count the member_count to set
+     * @since mod_jk 1.2.20
+     */
+    public void setMember_count(int member_count) {
+        this.member_count = member_count;
+    }
+    
+    /**
+     * @return the map_count
      * @since mod_jk 1.2.20
-	 */
-	public int getBad() {
-		return bad;
-	}
-	/**
-	 * @param bad the bad to set
-     * @since mod_jk 1.2.20
-	 */
-	public void setBad(int bad) {
-		this.bad = bad;
-	}
-	/**
-	 * @return the busy
-     * @since mod_jk 1.2.20
-	 */
-	public int getBusy() {
-		return busy;
-	}
-	/**
-	 * @param busy the busy to set
-     * @since mod_jk 1.2.20
-	 */
-	public void setBusy(int busy) {
-		this.busy = busy;
-	}
-	/**
-	 * @return the degraded
-     * @since mod_jk 1.2.20
-	 */
-	public int getDegraded() {
-		return degraded;
-	}
-	/**
-	 * @param degraded the degraded to set
-     * @since mod_jk 1.2.20
-	 */
-	public void setDegraded(int degraded) {
-		this.degraded = degraded;
-	}
-	/**
-	 * @return the good
-     * @since mod_jk 1.2.20
-	 */
-	public int getGood() {
-		return good;
-	}
-	/**
-	 * @param good the good to set
-     * @since mod_jk 1.2.20
-	 */
-	public void setGood(int good) {
-		this.good = good;
-	}
-	/**
-	 * @return the lock
-     * @since mod_jk 1.2.20
-	 */
-	public String getLock() {
-		return lock;
-	}
-	/**
-	 * @param lock the lock to set
-     * @since mod_jk 1.2.20
-	 */
-	public void setLock(String lock) {
-		this.lock = lock;
-	}
-	/**
-	 * @return the max_busy
-     * @since mod_jk 1.2.20
-	 */
-	public int getMax_busy() {
-		return max_busy;
-	}
-	/**
-	 * @param max_busy the max_busy to set
-     * @since mod_jk 1.2.20
-	 */
-	public void setMax_busy(int max_busy) {
-		this.max_busy = max_busy;
-	}
-	/**
-	 * @return the method
-     * @since mod_jk 1.2.20
-	 */
-	public String getMethod() {
-		return method;
-	}
-	/**
-	 * @param method the method to set
-     * @since mod_jk 1.2.20
-     */
-	public void setMethod(String method) {
-		this.method = method;
-	}
-	
-	/**
-	 * @return the member_count
-     * @since mod_jk 1.2.20
- 	 */
-	public int getMember_count() {
-		return member_count;
-	}
-	
-	/**
-	 * @param member_count the member_count to set
-     * @since mod_jk 1.2.20
- 	 */
-	public void setMember_count(int member_count) {
-		this.member_count = member_count;
-	}
-	
-	/**
-	 * @return the map_count
-     * @since mod_jk 1.2.20
- 	 */
-	public int getMap_count() {
-		return map_count;
-	}
+     */
+    public int getMap_count() {
+        return map_count;
+    }
 
-	/**
-	 * @param map_count the map_count to set
+    /**
+     * @param map_count the map_count to set
      * @since mod_jk 1.2.20
-	 */
-	public void setMap_count(int map_count) {
-		this.map_count = map_count;
-	}
+     */
+    public void setMap_count(int map_count) {
+        this.map_count = map_count;
+    }
+    
+    /**
+     * @return the time_to_maintenance_min
+     * @since mod_jk 1.2.21
+     */
+    public int getTime_to_maintenance_min() {
+        return time_to_maintenance_min;
+    }
+
+    /**
+     * @param time_to_maintenance_min the time_to_maintenance_min to set
+     * @since mod_jk 1.2.21
+     */
+    public void setTime_to_maintenance_min(int time_to_maintenance_min) {
+        this.time_to_maintenance_min = time_to_maintenance_min;
+    }
+    
+    /**
+     * @return the time_to_maintenance_max
+     * @since mod_jk 1.2.21
+     */
+    public int getTime_to_maintenance_max() {
+        return time_to_maintenance_max;
+    }
+
+    /**
+     * @param time_to_maintenance_max the time_to_maintenance_max to set
+     * @since mod_jk 1.2.21
+     */
+    public void setTime_to_maintenance_max(int time_to_maintenance_max) {
+        this.time_to_maintenance_max = time_to_maintenance_max;
+    }
     
 }

Modified: tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java?view=diff&rev=500555&r1=500554&r2=500555
==============================================================================
--- tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java (original)
+++ tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java Sat Jan 27 07:59:41 2007
@@ -425,6 +425,10 @@
                 Integer.toString(balancer.getMember_count()));
         getProject().setNewProperty(prefix + ".max_busy",
                 Integer.toString(balancer.getMax_busy()));
+        getProject().setNewProperty(prefix + ".time_to_maintenance_min",
+                Integer.toString(balancer.getTime_to_maintenance_min()));
+        getProject().setNewProperty(prefix + ".time_to_maintenance_max",
+                Integer.toString(balancer.getTime_to_maintenance_max()));
         getProject().setNewProperty(prefix + ".lock",
                 balancer.getLock());
  
@@ -469,8 +473,14 @@
         if(balancer.getMember_count() >=0) {
         	createProperty(balancer, balancerIndex, "member_count");
         }
-        if(balancer.getMember_count() >=0) {
+        if(balancer.getMap_count() >=0) {
         	createProperty(balancer, balancerIndex, "map_count");
+        }
+        if(balancer.getTime_to_maintenance_min() >=0) {
+        	createProperty(balancer, balancerIndex, "time_to_maintenance_min");
+        }
+        if(balancer.getTime_to_maintenance_max() >=0) {
+        	createProperty(balancer, balancerIndex, "time_to_maintenance_max");
         }
    }
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=500555&r1=500554&r2=500555
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Jan 27 07:59:41 2007
@@ -1271,6 +1271,8 @@
         jk_print_xml_att_int(s, 4, "busy", lb->s->busy);
         jk_print_xml_att_int(s, 4, "max_busy", lb->s->max_busy);
         jk_print_xml_att_int(s, 4, "map_count", map_count);
+        jk_print_xml_att_int(s, 4, "time_to_maintenance_min", ms_min);
+        jk_print_xml_att_int(s, 4, "time_to_maintenance_max", ms_max);
         jk_print_xml_stop_elt(s, 2, 0);
 
     }
@@ -1292,6 +1294,8 @@
         jk_printf(s, " busy=%d", lb->s->busy);
         jk_printf(s, " max_busy=%d", lb->s->max_busy);
         jk_printf(s, " map_count=%d", map_count);
+        jk_printf(s, " time_to_maintenance_min=%d", ms_min);
+        jk_printf(s, " time_to_maintenance_max=%d", ms_max);
         jk_puts(s, "\n");
 
     }
@@ -1312,6 +1316,8 @@
         jk_print_prop_att_int(s, w, name, "busy", lb->s->busy);
         jk_print_prop_att_int(s, w, name, "max_busy", lb->s->max_busy);
         jk_print_prop_att_int(s, w, name, "map_count", map_count);
+        jk_print_prop_att_int(s, w, name, "time_to_maintenance_min", ms_min);
+        jk_print_prop_att_int(s, w, name, "time_to_maintenance_max", ms_max);
 
     }
 

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=500555&r1=500554&r2=500555
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Jan 27 07:59:41 2007
@@ -27,6 +27,10 @@
   <subsection name="Native">
     <changelog>
       <add>
+      JkStatus: Add estimated time until next global maintenance to other
+      mime types and adopt jkstatus ant task. (rjung)
+      </add>
+      <add>
       JkStatus: Show estimated time until next global maintenance.
       Change displayed time until next recovery to a min/max pair. (rjung)
       </add>

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/jkstatustasks.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/jkstatustasks.xml?view=diff&rev=500555&r1=500554&r2=500555
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/jkstatustasks.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/jkstatustasks.xml Sat Jan 27 07:59:41 2007
@@ -113,9 +113,11 @@
 [echoproperties] worker.result.type=OK
 [echoproperties] worker.loadbalancer.member_count=2
 [echoproperties] worker.loadbalancer.map_count=2
+[echoproperties] worker.loadbalancer.mtime_to_maintenance_min=12
+[echoproperties] worker.loadbalancer.mtime_to_maintenance_max=75
 [echoproperties] worker.node02.lbfactor=1
 [echoproperties] worker.node02.max_busy=0
-[echoproperties] worker.jk_version=mod_jk/1.2.20-dev
+[echoproperties] worker.jk_version=mod_jk/1.2.21-dev
 [echoproperties] worker.loadbalancer.bad=0
 [echoproperties] worker.node02.redirect=
 [echoproperties] worker.node01.host=localhost
@@ -143,7 +145,7 @@
 [echoproperties] worker.node02.address=127.0.0.1\:7409
 [echoproperties] worker.node02.readed=0
 [echoproperties] worker.loadbalancer.busy=0
-[echoproperties] worker.web_server=Apache/2.0.59 (Unix) mod_jk/1.2.20-dev
+[echoproperties] worker.web_server=Apache/2.0.59 (Unix) mod_jk/1.2.21-dev
 [echoproperties] worker.node02.errors=0
 [echoproperties] worker.node02.type=ajp13
 [echoproperties] worker.loadbalancer.map.1.uri=/ClusterTest*



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org