Yes Lahiru, may be we can introduce several unit tests to verify these
methods in Cluster Monitor. WDYT?

Thanks

On Tue, Feb 17, 2015 at 6:37 PM, Lahiru Sandaruwan <[email protected]> wrote:

> Looks like that line need to be changed to following, as mincheck expects
> count of primary members,
>
> getMinCheckKnowledgeSession().setGlobal("primaryMemberCount", 
> primaryMemberListInClusterInstance.size());
>
>
> On Tue, Feb 17, 2015 at 6:33 PM, Imesh Gunaratne <[email protected]> wrote:
>
>> Hi Devs,
>>
>> As I see following line highlighted is not correct:
>>
>> getScaleCheckKnowledgeSession().setGlobal("primaryMembers", 
>> primaryMemberListInClusterInstance);
>> getMinCheckKnowledgeSession().setGlobal("clusterId", getClusterId());
>> getMinCheckKnowledgeSession().setGlobal("isPrimary", hasPrimary);
>>
>> String paritionAlgo = instanceContext.getPartitionAlgorithm();
>>
>> getMinCheckKnowledgeSession().setGlobal("algorithmName",
>>         paritionAlgo);
>>
>> if (log.isDebugEnabled()) {
>>     log.debug(String.format("Running minimum check for cluster instance %s ",
>>             instanceContext.getId() + " for the cluster: " + clusterId));
>> }
>>
>> minCheckFactHandle = 
>> AutoscalerRuleEvaluator.evaluate(getMinCheckKnowledgeSession(),
>>         minCheckFactHandle, instanceContext);
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: [email protected] blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to