Re: Clarification on instanceRange check in RuleTaskDelegator

2014-12-21 Thread Reka Thirunavukkarasu
Thanks Lahiru for looking into this..yah..+1 for the above fix.. Thanks, Reka On Sun, Dec 21, 2014 at 4:30 PM, Lahiru Sandaruwan wrote: > I think we can solve it better by adding an "else" part to the logic, > > We can increase the required number instance by one in the case of > "max=min". The

Re: Clarification on instanceRange check in RuleTaskDelegator

2014-12-21 Thread Lahiru Sandaruwan
I think we can solve it better by adding an "else" part to the logic, We can increase the required number instance by one in the case of "max=min". Then it will send the maxOut event in rule evaluation since it is checked already. I'll change the commit as follows, if(instanceRange != 0){ fl

Re: Clarification on instanceRange check in RuleTaskDelegator

2014-12-21 Thread Lahiru Sandaruwan
Hi Reka, On Sun, Dec 21, 2014 at 1:18 PM, Reka Thirunavukkarasu wrote: > Hi Lahiru, > > I saw the following code when calculating required instances. Since it is > checking the instanceRange > 0, whenever the cluster instance reaches it > maximum, this instanceRange is 0. > We get the instance

Re: Clarification on instanceRange check in RuleTaskDelegator

2014-12-20 Thread Reka Thirunavukkarasu
Please find the code segment as below: public int getNumberOfInstancesRequiredBasedOnMemoryConsumption(float threshold, double predictedValue, int max, int min) { double numberOfAdditionalInstancesRequired = 0; if(

Clarification on instanceRange check in RuleTaskDelegator

2014-12-20 Thread Reka Thirunavukkarasu
Hi Lahiru, I saw the following code when calculating required instances. Since it is checking the instanceRange > 0, whenever the cluster instance reaches it maximum, this instanceRange is 0. At that point even though the load is high no decision is taken as the required instances is not getting c