EMR上的Impala无法连接到远程Metastore

时间:2014-03-07 00:21:55

标签: hadoop hive amazon emr impala

我正在尝试在Amazon EMR上使用Impala。 我可以用hive读取S3数据。但我不能用impala-shell。我试过'使元数据无效'。 远程Metastore在RDS中。但Impala可能会在EMR主节点上使用Metastore。 如何在impala中使用远程Metastore?

我使用Amazon EMR命令行界面启动了EMR。

./elastic-mapreduce \
--create \
--name "Impala" \
--alive \
--enable-debugging \
--log-uri "s3n://hoge/hoge.log" \
--key-pair "hoge" \
--instance-group master --instance-type m1.large --instance-count 1\
--instance-group core --instance-type m1.large --instance-count 1\
--ami-version 3.0.2 \
--impala-interactive \
--hive-interactive \
--hive-site "s3n://hoge/hive-site.xml"

hive-site.xml是这样的。这与http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-dev-create-metastore-outside.html

相同
<configuration>
  <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://hostname:3306/hive?createDatabaseIfNotExist=true</value>
    <description>JDBC connect string for a JDBC metastore</description>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
    <description>Driver class name for a JDBC metastore</description>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>username</value>
    <description>Username to use against metastore database</description>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>password</value>
    <description>Password to use against metastore database</description>
  </property>
</configuration>

0 个答案:

没有答案