> On May 10, 2016, 2:56 a.m., Puneet Gupta wrote: > > lens-server/src/main/java/org/apache/lens/server/util/UtilityMethods.java, > > line 212 > > <https://reviews.apache.org/r/47007/diff/5/?file=1376859#file1376859line212> > > > > Should we return empty byte[] to prevent NP is code ?
Empty array could also be equal.. There won't be any nullpointer actually even we return null. Arrays.equals() returns false if any of the argument is null. and setter will also not thorw nullpointer. > On May 10, 2016, 2:56 a.m., Puneet Gupta wrote: > > lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java, > > line 847 > > <https://reviews.apache.org/r/47007/diff/5/?file=1376860#file1376860line847> > > > > What is the run time for this test case ? Is it possible to optimize to > > reduce the run time > > > > Instead of DeferredPersistentResultFormatter we can also use > > QueryExecutionServiceImpl#pauseQuerySubmitter. This will make sure query > > does not finish execution. See if this makes ur life simpler. in my machine mvn test -Dtest="TestQueryService#testExecuteAsyncDuplicate" the module lens server took 01:31 min After using pauseQuerySubmitter - Lavkesh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47007/#review132366 ----------------------------------------------------------- On May 9, 2016, 5:24 p.m., Lavkesh Lahngir wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47007/ > ----------------------------------------------------------- > > (Updated May 9, 2016, 5:24 p.m.) > > > Review request for lens. > > > Bugs: LENS-1019 > https://issues.apache.org/jira/browse/LENS-1019 > > > Repository: lens > > > Description > ------- > > If query is repeated from user - with same query, same name, same conf on the > same session > and earlier is still queued or running, then return the same handle. This > will only handle the case of aysnc queries. > > > Diffs > ----- > > > lens-server-api/src/main/java/org/apache/lens/server/api/LensConfConstants.java > 23537cb > > lens-server-api/src/main/java/org/apache/lens/server/api/query/QueryContext.java > 94b79d0 > > lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java > 42bd4ab > lens-server/src/main/java/org/apache/lens/server/util/UtilityMethods.java > a6c7b13 > > lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java > df13ba2 > > Diff: https://reviews.apache.org/r/47007/diff/ > > > Testing > ------- > > testExecuteAsyncDuplicate() methods tests the following. > 1. Same query, same user and same session returns the same handle. > 2. After query completion, same query firing will give the different handle. > 3. Differnt session and same query will return different handle. > > > Thanks, > > Lavkesh Lahngir > >
