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

Deepak Barr commented on LENS-639:
----------------------------------

mvn clean install summary

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [  2.444 s]
[INFO] Lens ............................................... SUCCESS [  5.250 s]
[INFO] Lens API ........................................... SUCCESS [ 33.288 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 26.490 s]
[INFO] Lens Cube .......................................... SUCCESS [09:54 min]
[INFO] Lens DB storage .................................... SUCCESS [ 30.342 s]
[INFO] Lens Query Library ................................. SUCCESS [ 20.741 s]
[INFO] Lens Hive Driver ................................... SUCCESS [04:43 min]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 53.285 s]
[INFO] Lens Elastic Search Driver ......................... SUCCESS [ 20.703 s]
[INFO] Lens Server ........................................ SUCCESS [10:46 min]
[INFO] Lens client ........................................ SUCCESS [01:22 min]
[INFO] Lens CLI ........................................... SUCCESS [05:29 min]
[INFO] Lens Examples ...................................... SUCCESS [ 23.526 s]
[INFO] Lens Distribution .................................. SUCCESS [ 23.675 s]
[INFO] Lens ML Lib ........................................ SUCCESS [02:36 min]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [  3.781 s]
[INFO] Lens Regression .................................... SUCCESS [ 13.658 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39:11 min
[INFO] Finished at: 2015-08-04T18:32:37+05:30
[INFO] Final Memory: 208M/2454M
[INFO] ------------------------------------------------------------------------

> Error creating table finished_queries in MySQL when autocommit=true 
> --------------------------------------------------------------------
>
>                 Key: LENS-639
>                 URL: https://issues.apache.org/jira/browse/LENS-639
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Deepak Barr
>            Assignee: Deepak Barr
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.3
>
>         Attachments: LENS-639.02.patch
>
>
> I am trying to persist the finished queries in a MySQL database by changing 
> the following settings :
>   <property>
>       <name>lens.server.db.driver.name</name>
>       <value>com.mysql.jdbc.Driver</value>
>       <description>Database driver for database where Finished queries have 
> to be stored.
>       Also used for database based user config loaders</description>
>    </property>
>    <property>
>       <name>lens.server.db.jdbc.url</name>
>       <value>jdbc:mysql://localhost:3306/lens_db</value>
>       <description>JDBC URL where the database for storing finished queries 
> is located.
>       Also used for database based user config loaders</description>
>    </property>
>    <property>
>       <name>lens.server.db.jdbc.user</name>
>       <value>username</value>
>       <description>JDBC User for Finished queries table. Also used for 
> database based user config loaders</description>
>    </property>
>    <property>
>       <name>lens.server.db.jdbc.pass</name>
>       <value>password</value>
>       <description>JDBC Password for Finished queries table. Also used for 
> database based user config loaders</description>
>    </property>
> The following exception is thrown on when lens starts :
> 30 Jun 2015 14:27:34,052 [main] WARN 
> org.apache.lens.server.query.LensServerDAO - Unable to create finished 
> queries table
> java.sql.SQLException: Can't call commit when autocommit=true
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:930)
> at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1597)
> at 
> org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
> at 
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211)
> at 
> org.apache.lens.server.query.LensServerDAO.createFinishedQueriesTable(LensServerDAO.java:104)
> at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.initalizeFinishedQueryStore(QueryExecutionServiceImpl.java:890)
> at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.init(QueryExecutionServiceImpl.java:877)
> at org.apache.hive.service.CompositeService.init(CompositeService.java:59)
> at org.apache.lens.server.LensServices.init(LensServices.java:206)
> at org.apache.lens.server.LensServer.startServices(LensServer.java:137)
> at org.apache.lens.server.LensServer.<init>(LensServer.java:89)
> at org.apache.lens.server.LensServer.createLensServer(LensServer.java:78)
> at org.apache.lens.server.LensServer.main(LensServer.java:190)
> The bug lies in createFinishedQueriesTable() method in LensServerDAO. 
> commit() method will throw this exception if autocommit is true. We must put 
> a check so that we commit only when autocommit is false.



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

Reply via email to