> On May 25, 2016, 6:27 a.m., Puneet Gupta wrote:
> > lens-cube/src/test/java/org/apache/lens/driver/cube/TestWeightedCostSelector.java,
> >  lines 140-153
> > <https://reviews.apache.org/r/47777/diff/1/?file=1392427#file1392427line140>
> >
> >     Not sure if this is correct way to check. 
> >     
> >     Shoud we check
> >     
> >     1. p3>p2>p1 and/or 
> >     2. p3>=50% and P2>=30% and p1>=20%
> >     
> >     Point 2 may not be true always. It depends on wwighted random 
> > selection. Poin1 should hold good always at least in this case.
> >     For Point 2 we can have some buffer (+-10%) .

The driver ratios set for the test were
d1: 30%
d2: 20%
d3: 50%

Since the sum of p1,p2,p3 =100, if some of them can be greater than their 
desired percentages, the other(s) will be lesser so that the resulting sum is 
100.

For 10,000 driver allocation loops, it was observed that the obtained 
percentages were at most within 0.6% deviation from the desired percentages 
after running the test 20 times.

Added another percentage of buffer for good measure.
Corrected the driver 3 error message.


> On May 25, 2016, 6:27 a.m., Puneet Gupta wrote:
> > lens-server-api/src/main/java/org/apache/lens/server/api/driver/WeightCostSelector.java,
> >  line 62
> > <https://reviews.apache.org/r/47777/diff/1/?file=1392428#file1392428line62>
> >
> >     if a driver has "lens.driver.driverratio" not set, should it be added 
> > to eligible drivers ? We need to handle the case where there are say 3 
> > drivers which have have the minimum cost, and only 2 have 
> > "lens.driver.driverratio" set.

Giving a default driver ratio of 1 so that if none of the ratios are set, the 
distribution between them is equal.
If the ratio is set in a few of the drivers, the small default weight doesn't 
affect the overall allocation distribution much.

In your given case, (say d1:30  d2:20  d3: not-set), the distribution will be 
59%,39%,2% for the three drivers


- Anshul


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47777/#review134705
-----------------------------------------------------------


On May 24, 2016, 3:35 p.m., Anshul Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47777/
> -----------------------------------------------------------
> 
> (Updated May 24, 2016, 3:35 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-661
>     https://issues.apache.org/jira/browse/LENS-661
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Added Weighted selector
> 
> 
> Diffs
> -----
> 
>   
> lens-cube/src/test/java/org/apache/lens/driver/cube/TestWeightedCostSelector.java
>  PRE-CREATION 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/driver/WeightCostSelector.java
>  PRE-CREATION 
>   
> lens-server-api/src/main/java/org/apache/lens/server/api/query/AbstractQueryContext.java
>  e160f58bfb45cffb05b9f6be19db3bc7605dde57 
> 
> Diff: https://reviews.apache.org/r/47777/diff/
> 
> 
> Testing
> -------
> 
> Here's the reactor summary after running mvn clean package
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Server ........................................ SUCCESS [11:32 
> min]
> [INFO] Lens client ........................................ SUCCESS [01:49 
> min]
> [INFO] Lens CLI ........................................... SUCCESS [02:02 
> min]
> [INFO] Lens Examples ...................................... SUCCESS [  8.430 
> s]
> [INFO] Lens Ship Jars to Distributed Cache ................ SUCCESS [  2.801 
> s]
> [INFO] Lens Distribution .................................. SUCCESS [ 21.429 
> s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:28 
> min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 20.690 
> s]
> [INFO] Lens Regression .................................... SUCCESS [  9.313 
> s]
> [INFO] Lens UI ............................................ SUCCESS [ 14.163 
> s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 19:10 min
> [INFO] Finished at: 2016-05-24T20:31:02+05:30
> [INFO] Final Memory: 103M/466M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Anshul Gupta
> 
>

Reply via email to