我正在尝试使用外部MySQL作为Hive元存储来设置EMR集群。我在EC2机器上创建了MySQL数据库"元存储",并在下面的hive-site中使用.xml
<configuration> <property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://10.10.xxx.xxx:3306/metastore?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description> </property> <property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
<description>Username to use against metastore database</description> </property> <property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>xxxxxx</value>
<description>Password to use against metastore database</description> </property> </configuration>
群集创建失败,出现以下错误(来自 stderr 文件的日志)
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get 架构版本。 * schemaTool failed org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get 架构版本。 schemaTool failed */mnt/var/lib/hadoop/steps/s-xxxxx/./hive-script:617:错误 正在执行cmd:/usr/share/aws/emr/scripts/hive-script "--install-hive" "--base-path" "s3://us-west-2.elasticmapreduce/libs/hive" "--hive-versions命令以 ret '1' 退出
请帮忙。
存在一些 AWS 安全组问题。通过允许访问MySQL端口,我解决了这个问题