You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Himanshu Gahlaut (JIRA)" <ji...@apache.org> on 2015/07/22 09:36:04 UTC

[jira] [Commented] (LENS-678) Comment in lens-site.xml in src/test/resources is not correct with conf value

    [ https://issues.apache.org/jira/browse/LENS-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14636439#comment-14636439 ] 

Himanshu Gahlaut commented on LENS-678:
---------------------------------------

The value of  lens.server.max.finished.queries can only be changed to 0 to align with comment after LENS-684 is fixed.

> Comment in lens-site.xml in src/test/resources is not correct with conf value
> -----------------------------------------------------------------------------
>
>                 Key: LENS-678
>                 URL: https://issues.apache.org/jira/browse/LENS-678
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Himanshu Gahlaut
>
> https://github.com/apache/incubator-lens/blob/master/lens-server/src/test/resources/lens-site.xml#L122
> {code:xml}
> <property>
>     <!-- Immediately insert all finished queries to DB -->
>     <name>lens.server.max.finished.queries</name>
>     <value>1</value>
>  </property>
> {code}
> Comment mentions that finished queries will be immediately inserted into DB.
> As per code given below, for a finished query to be immediately inserted into DB, (size > maxFinishedQueries) expression should be true. Assume one query enters finishedQueries queue. (size = 1). To immediately deque this query, 1 should be greater than maxFinishedQueries. This would happen only if maxFinishedQueries is 0. However in the lens-site.xml code above, lens.server.max.finished.queries is set to 1.
> {code}
>    @Override
>     public long getDelay(TimeUnit units) {
>       int size = finishedQueries.size();
>       if (size > maxFinishedQueries) {
>         return 0;
>       } else {
>         return Integer.MAX_VALUE;
>       }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)