FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:An exception was thrown while adding/validating class(es) : 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 '[CHARACTER SET charset_name] [COLLATE collation_name] NULL,
`VIEW_ORIGINAL_T' at line 13
java.sql.SQLSyntaxErrorException: 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 '[CHARACTER SET charset_name] [COLLATE collation_name] NULL,
`VIEW_ORIGINAL_T' at line 13
解決方法:手動初始化元數據庫
schematool -dbType mysql -initSchema
注意:當使用的 hive 是 2.x 之前的版本,不做初始化也是 OK 的,當 hive 第一次啓動的 時候會自動進行初始化,只不過會不會生成足夠多的元數據庫中的表。在使用過程中會 慢慢生成。但最後進行初始化。如果使用的 2.x 版本的 Hive,那麼就必須手動初始化元 數據庫!