Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
We need to improve the error messages seen by users when the metastore is not configured correctly.
MySQL JDBC JAR not on classpath:
hive> show tables; show tables; FAILED: Error in metadata: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory NestedThrowables: java.lang.reflect.InvocationTargetException FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
JDBC URL references a MySQL DB that doesn't exist:
hive> show tables; FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Unknown database 'mdb' NestedThrowables: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown database 'mdb' FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
datanucleus.autoCreateSchema=false and metastore schema doesn't exist:
hive> show tables; FAILED: Error in metadata: javax.jdo.JDODataStoreException: Required table missing : "`DBS`" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operations. Either your MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables" NestedThrowables: org.datanucleus.store.rdbms.exceptions.MissingTableException: Required table missing : "`DBS`" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operations. Either your MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables" FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask