You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Raju Bairishetti (JIRA)" <ji...@apache.org> on 2015/08/05 06:05:05 UTC
[jira] [Updated] (LENS-639) Error creating table finished_queries
in MySQL when autocommit=true
[ https://issues.apache.org/jira/browse/LENS-639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raju Bairishetti updated LENS-639:
----------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed. Thanks [~deepak.barr]
> 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)