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

Amareshwari Sriramadasu commented on LENS-640:
----------------------------------------------

Whats the way forward for local and docket setup? We cannot assume 
FinsihedQueries table will be always created manually.

here is an option i could think - Make creation of the table configurable say 
lens.server.setup.server.db to true or false. For local, docker and test setup 
it will be true - can be left with default to false (making sure other setup 
configs are overriden).  sounds fine?

> Create table query for finished_queries table does not work with MySQL 5.6
> --------------------------------------------------------------------------
>
>                 Key: LENS-640
>                 URL: https://issues.apache.org/jira/browse/LENS-640
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Deepak Barr
>            Assignee: Deepak Barr
>            Priority: Minor
>             Fix For: 2.3
>
>
> The create query in LensServerDAO class works fine on MySQL 5.1 but throws 
> the following error on MySQL 5.6 -
> java.sql.SQLException: Column length too big for column 'metadata' (max = 
> 21845); use BLOB or TEXT instead Query: CREATE TABLE if not exists 
> finished_queries (handle varchar(255) not null unique,userquery 
> varchar(10000) not null,submitter varchar(255) not null,starttime bigint, 
> endtime bigint,result varchar(255),status varchar(255), metadata 
> varchar(100000), rows int, errormessage varchar(10000), driverstarttime 
> bigint, driverendtime bigint, metadataclass varchar(10000),queryname 
> varchar(255),submissiontime bigint) Parameters: []
>         at 
> org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:363)
>         at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:490)
>         at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:420)
>         at 
> org.apache.lens.server.query.LensServerDAO.createTable(LensServerDAO.java:75)
>         at 
> org.apache.lens.server.query.LensServerDAO.createFinishedQueriesTable(LensServerDAO.java:103)
>         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)
> I figured changing the big "VARCHAR" fields to "TEXT" fields will fix the 
> error. 



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

Reply via email to