Hi,
I am trying to use mysql_server-5.1.41.0 as the local db for hive
following instructions at
http://wiki.apache.org/hadoop/Hive/AdminManual/MetastoreAdmin#Local_Meta
store
I get the following exception:
FAILED: Error in metadata: MetaException(message:Got exception:
javax.jdo.JDODataStoreException An exception was thrown while
adding/validating class(es) : Specified key was too long; max key length
is 767 bytes
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Specified key was
too long; max key length is 767 bytes
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
..
at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:242)
at
org.apache.hadoop.hive.metastore.ObjectStore.getTables(ObjectStore.java:
572)
at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$24.run(HiveMet
aStore.java:1295)
at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$24.run(HiveMet
aStore.java:1292)
at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.executeWithRet
ry(HiveMetaStore.java:229)
at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_tables(Hiv
eMetaStore.java:1292)
at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(HiveMetaS
toreClient.java:533)
..
Initially my hunch was that the server was configured to use utf8 as its
default charset and reading in some web forums that had known to cause
the above error.
However even after chaning the character set to latin1 (settings below),
I still see the error - any pointers to what I should change on my mysql
setup would be greatly appreciated.
Thanks,
Pradeep
===============================================
mysql settings related to charset:
grep -i latin1 /etc/my.cnf
character_set_server = latin1
collation_server = latin1_swedish_ci
default_character_set = latin1