You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Puneet Gupta (JIRA)" <ji...@apache.org> on 2016/01/13 08:39:39 UTC

[jira] [Comment Edited] (LENS-922) [client JDBC] lens session is shared by many users.

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

Puneet Gupta edited comment on LENS-922 at 1/13/16 7:39 AM:
------------------------------------------------------------

Generally the connections in the pool are created with same credentials (user, password) and it does not hold user specific connections. For example, say lens DB has a lens DB user "master". So all connections are created with user master.The pool intern can used by many lens users indirectly via lens server.

Coming back to lens JDBC client (where lens server acts as a DB), we would require a separate connection for each user (since a connection translates internally to a lens session which is tied up to a lens user). So do we need a pool in this case ? Its more like one user one connection and one lens session. 

If we need a pool of connections, I am assuming that user is a bot(another app) which may concurrently spawns many flows  on lens server and hence would require a pool of connections.  In this case we can have a pool of connections, all created with same user "bot" and each connection internally holding a different lens session for user bot. Apache DBCP or Generic pool can be used for this. 

So we should not decouple lens session and lens jdbc connection. 









was (Author: puneet884):
Generally the connections in the pool are created with same credentials (user, password) and it does not hold user specific connections. For example, say lens DB has a lens DB user "master". So all connections are created with user master.
The pool intern can used by many lens users indirectly via lens server.

Coming back to lens JDBC client (where lens server acts as a DB), we would require a separate connection for each user (since a connection translates internally to a lens session which is tied up to a lens user). So do we need a pool in this case ? Its more like one user one connection and one lens session. 
If we need a pool of connections, I am assuming that user is a bot(another app) which may concurrently spawns many flows  on lens server and hence would require a pool of connections.  In this case we can have a pool of connections, all created with same user "bot" and each connection internally holding a different lens session for user bot. Apache DBCP or Generic pool can be used for this. 

So we should not decouple lens session and lens jdbc connection. 








> [client JDBC] lens session is shared by many users.
> ---------------------------------------------------
>
>                 Key: LENS-922
>                 URL: https://issues.apache.org/jira/browse/LENS-922
>             Project: Apache Lens
>          Issue Type: Improvement
>            Reporter: piyush
>
> In current lens jdbc client:
> lens session is attached with jdbc connection.
> most of the application create jdbc connection pool and connection
>  can be reused by multiple users. so effectively multiple users will share the the single connection and hence the lens session. 



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