Hi,
*org.apache.stratos.autoscaler.monitor.VMServiceClusterMonitor.run();*
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/VMServiceClusterMonitor.java
@Override
public void run() {
* try {*
* // TODO make this configurable,*
* // this is the delay the min check of normal cluster monitor
to wait until LB monitor is added*
* Thread.sleep(60000);*
* } catch (InterruptedException ignore) {*
* }*
while (!isDestroyed()) {
if (log.isDebugEnabled()) {
log.debug("VMServiceClusterMonitor is running.. " +
this.toString());
}
try {
if(!ClusterStatus.In_Maintenance.equals(getStatus())) {
monitor();
} else {
if (log.isDebugEnabled()) {
log.debug("VMServiceClusterMonitor is suspended as
the cluster is in " +
ClusterStatus.In_Maintenance + "
mode......");
}
}
} catch (Exception e) {
log.error("VMServiceClusterMonitor : Monitor failed." +
this.toString(), e);
}
try {
Thread.sleep(getMonitorInterval());
} catch (InterruptedException ignore) {
}
}
}
Can anyone clarify why we are doing this delay? How we can say that
LbClusterMonitor is added in 1 min?
Thanks.
--
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
Mobile +94777568639 | +94783498120