Hi Martin, These flags are getting set as part of the stats received from CEP on the summarized-health-stats topic. If you could look at the org.apache.stratos.autoscaler.message.receiver.health.AutoscalerHealthStatEventReceiver, you can find the relevant setters for the events. In those setters, these flags are getting set. We used these flags to identify whether all stats average, gradient and second derivative are received before we execute the scaling drool. After the scale drool executes, we are resetting these flags in order to get new events in the next execution.
Thanks, Reka On Tue, Jun 24, 2014 at 11:18 PM, Martin Eppel (meppel) <[email protected]> wrote: > > > > Hi, > > > > In the ClusterMonitor.java, before invoking the scaler rule, the code checks certain parameters (see code snipplet below) before invoking the rule – when and where in the code are these flags (rifReset || memoryConsumptionReset || loadAverageReset) set to true ? > > > > Thanks > > > > Martin > > > > > > > > if(rifReset || memoryConsumptionReset || loadAverageReset){ > > > > scaleCheckKnowledgeSession.setGlobal("clusterId", clusterId); > > //scaleCheckKnowledgeSession.setGlobal("deploymentPolicy", deploymentPolicy); > > scaleCheckKnowledgeSession.setGlobal("autoscalePolicy", autoscalePolicy); > > scaleCheckKnowledgeSession.setGlobal("rifReset", rifReset); > > scaleCheckKnowledgeSession.setGlobal("mcReset", memoryConsumptionReset); > > scaleCheckKnowledgeSession.setGlobal("laReset", loadAverageReset); > > scaleCheckKnowledgeSession.setGlobal("lbRef", lbReferenceType); > > > > if (log.isDebugEnabled()) { > > log.debug(String.format("Running scale check for network partition %s ", networkPartitionContext.getId())); > > } > > > > scaleCheckFactHandle = AutoscalerRuleEvaluator.evaluateScaleCheck(scaleCheckKnowledgeSession > > , scaleCheckFactHandle, networkPartitionContext); > > > > networkPartitionContext.setRifReset(false); > > networkPartitionContext.setMemoryConsumptionReset(false); > > networkPartitionContext.setLoadAverageReset(false); > > } else if(log.isDebugEnabled()){ > > log.debug(String.format("Scale rule will not run since the LB statistics have not received before this " + > > "cycle for network partition %s", networkPartitionContext.getId()) ); > > } -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007
