[ https://issues.apache.org/jira/browse/LENS-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14644064#comment-14644064 ]
Deepak Barr edited comment on LENS-640 at 7/28/15 8:34 AM: ----------------------------------------------------------- Yes, table creation can be made configurable. Does that mean the setting will always be false when he is using any other database like MySQL,postgres etc. What if he is using MySQL and turns the setting to true ? Like I said, a generic create table SQL thats works on all databases might not be a great idea. Keeping in mind that in future, we might have more tables for lens, I can think of two solutions 1. Explain in documentation about various tables and table definitions that needs to be created and explicitly ask the user to turn off the create table setting. The user will have the responsibility of creating the tables. 2. Provide SQL scripts for various databases just like hive provides for creation of its metastore. was (Author: deepak.barr): Yes, table creation can be made configurable. Does that mean the setting will always be false when he is using any other database like MySQL,postgres etc. What if he is using MySQL and turns the setting to true ? Like I said, a generic create table SQL thats works on all databases might not be a great idea. Keeping in mind that in future, we might have more tables for lens, I can think of two solutions 1. Explain in documentation about various tables and table definitions that needs to be created and explicitly ask the user to turn off the create table setting. 2. Provide SQL scripts for various databases just like hive provides for creation of its metastore. > 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)