在我提出问题之前,让我先解释一下这个场景。我在hbase
上设置了ec2
群集,其中包含3个实例:
i-xxxxxxx-- master, zookeeper1, regionserver1
i-xxxxxxx-- slave1, zookeeper2, regionserver2
i-xxxxxxx-- slave2, zookeeper3, regionserver3.
哪个工作得很好。现在,我正在尝试使用安装了hive的远程EMR实例连接到此群集的主服务器。 所以,我按照亚马逊aws文档的这个链接:
http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-hbase-access-hive.html
在创建某个表之前说过。让hive知道远程hbase master的public-DNS。 set hbase.zookeeper.quorum = public-DNS-name; 我完全按照提到的那样做了。但是,我无法连接到主人。我尝试使用以下脚本创建一个表:
CREATE TABLE hauto(cookie string, timespent string, pageviews string, visit string, logdate string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = "m:timespent, m:pageviews, m:visit, m:logdate")
TBLPROPERTIES ("hbase.table.name" = "hauto");
所以,它给出了这个错误:
FAILED: Error in metadata: MetaException(message:org.apache.hadoop.hbase.MasterNotRunningException: Retried 10 times
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:127)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.getHBaseAdmin(HBaseStorageHandler.java:74)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:148)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:467)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:460)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:74)
at com.sun.proxy.$Proxy14.createTable(Unknown Source)
at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:600)
at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3791)
at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:258)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:144)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1355)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1139)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:945)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:310)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:231)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:466)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:819)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:674)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:187)
)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
仅供参考,EMR
配置单元已安装实例且EC2 Hbase-cluster
位于同一安全组中。我是
能够远程登录从EMR到EC2的2181,60000,60010,60020端口以及从EC2到EMR的端口。
在该组中,我已经允许组内所有端口上的tcp,udp和ICMP连接。
我的/ etc / hosts文件的主人看起来像这样:
XXXXXXXXXXX master localhost
XXXXXXXXXXX zkserver1 rgserver1
XXXXXXXXXXX zkserver2 rgserver2
XXXXXXXXXXX zkserver3 rgserver3
我正在使用hadoop 1.0.1
,hbase 0.94.11
,hive 0.11.0
和zookeeper-3.4.3
。而且zookeeper是外部经理。
此外,之后我尝试了其他方式。这次我尝试从安装在EC2 Hbase集群上的hive CLI连接到EMR Hbase。现在,我能够在EMR hbase上创建相同的表。
更新了问题:
似乎这是亚马逊ec2的一个问题。我正在为您提供这些问题的快照以及链接:
http://hbase.apache.org/book.html#trouble.log.gc