CDH添加hive组件,异常解决
CM界面异常
hive角色日志
[pool-5-thread-26]:
javax.jdo.JDODataStoreException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:252)
at org.apache.hadoop.hive.metastore.ObjectStore.getMDatabase(ObjectStore.java:597)
at org.apache.hadoop.hive.metastore.ObjectStore.getJDODatabase(ObjectStore.java:653
解决办法:
google 了一下,关于这方面的错误都是spring的,看了几个以后有人说是驱动版本跟MySQL的版本差太大,于是抱着试试的态度把驱动版本提高了一下,
果然ok,
[root@hadoop2 ~]# mv /opt/cloudera/parcels/CDH/lib/hive/lib/mysql-connector-java-5.1.7-bin.jar /opt/cloudera/parcels/CDH/lib/hive/lib/mysql-connector-java-5.1.7-bin.jar.bak
[root@hadoop2 ~]# cp mysql-connector-java-5.1.37.jar /opt/cloudera/parcels/CDH/lib/hive/lib
[root@hadoop2 ~]#