stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Eppel (meppel)" <mep...@cisco.com>
Subject invkoing scaler.drl rule question
Date Tue, 24 Jun 2014 17:48:56 GMT


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())
);
            }

Mime
View raw message