> On March 29, 2016, 4:55 a.m., Rajat Khandelwal wrote:
> > lens-server/src/main/java/org/apache/lens/server/query/QueryContextPriorityComparator.java,
> >  line 28
> > <https://reviews.apache.org/r/45382/diff/2/?file=1316853#file1316853line28>
> >
> >     Just a suggestion, but we can keep both classes, code to an interface 
> > and have the implementation picked at runtime. 
> >     
> >     interface can be just `Comparator<QueryContext>`.
> >     
> >     There can be a base class `FIFOQueryComparator`.
> >     
> >     There will be two classes extending from `FIFOQueryComparator`, one for 
> > priority, the other for cost. Both classes will try to compare 
> > priority/cost themselves and will return the comparison result in case it's 
> > nonzero. Else, they'll delegate to `super.compare`, which will be comparing 
> > submission times. 
> >     
> >     Then, in query service impl, implementation will be picked from 
> > configuration, with default being, say, priority comparator.

+1


- Sushil


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


On March 28, 2016, 5:03 p.m., Sushil Mohanty wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45382/
> -----------------------------------------------------------
> 
> (Updated March 28, 2016, 5:03 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-995
>     https://issues.apache.org/jira/browse/LENS-995
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Query priority comparison changed from cost to priority.
> 
> 
> Diffs
> -----
> 
>   
> lens-server/src/main/java/org/apache/lens/server/query/QueryContextPriorityComparator.java
>  b25ad79 
>   
> lens-server/src/test/java/org/apache/lens/server/query/QueryContextPriorityComparatorTest.java
>  5ab9144 
>   
> lens-server/src/test/java/org/apache/lens/server/query/collect/DefaultQueryCollectionTest.java
>  d4b6bdf 
>   
> lens-server/src/test/java/org/apache/lens/server/query/collect/QueryCollectUtil.java
>  7789a4c 
> 
> Diff: https://reviews.apache.org/r/45382/diff/
> 
> 
> Testing
> -------
> 
> Updated unit tests. Will update the full test result shortly.
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO] 
> [INFO] Lens Checkstyle Rules ............................. SUCCESS [2.526s]
> [INFO] Lens .............................................. SUCCESS [3.149s]
> [INFO] Lens API .......................................... SUCCESS [28.971s]
> [INFO] Lens API for server and extensions ................ SUCCESS [21.122s]
> [INFO] Lens Cube ......................................... SUCCESS 
> [11:03.753s]
> [INFO] Lens DB storage ................................... SUCCESS [19.308s]
> [INFO] Lens Query Library ................................ SUCCESS [15.994s]
> [INFO] Lens Hive Driver .................................. SUCCESS [2:51.404s]
> [INFO] Lens Driver for JDBC .............................. SUCCESS [38.313s]
> [INFO] Lens Elastic Search Driver ........................ SUCCESS [15.941s]
> [INFO] Lens Server ....................................... SUCCESS 
> [16:19.132s]
> [INFO] Lens client ....................................... SUCCESS [33.445s]
> [INFO] Lens CLI .......................................... SUCCESS [2:48.932s]
> [INFO] Lens Examples ..................................... SUCCESS [10.445s]
> [INFO] Lens Ship Jars to Distributed Cache ............... SUCCESS [0.741s]
> [INFO] Lens Distribution ................................. SUCCESS [9.393s]
> [INFO] Lens ML Lib ....................................... SUCCESS [1:18.718s]
> [INFO] Lens ML Ext Distribution .......................... SUCCESS [1.872s]
> [INFO] Lens Regression ................................... SUCCESS [14.096s]
> [INFO] Lens UI ........................................... SUCCESS [28.280s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 38:26.722s
> [INFO] Finished at: Mon Mar 28 16:36:26 UTC 2016
> [INFO] Final Memory: 199M/1745M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Sushil Mohanty
> 
>

Reply via email to