You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org> on 2015/08/25 08:40:46 UTC
[jira] [Closed] (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:all-tabpanel ]
Amareshwari Sriramadasu closed LENS-678.
----------------------------------------
> 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
> Affects Versions: 2.0
> Reporter: Himanshu Gahlaut
> Assignee: Rajat Khandelwal
> Fix For: 2.3
>
>
> 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)