失败:元数据中的错误:元异常(消息:org.apache.hadoop.hbase)。MasterNotRunningException:在HBase +蜂巢中的运用

时间:2021-08-15 22:20:18

Componet used:- -Ubuntu 12.04, hive(0.9.0), hbase(0.94.3), hadoop(0.20.2)-single-node, zookeeper-3.4.3, guava-11.0.2, hive-hbase-handler-0.9.0

组件使用:- ubuntu 12.04, hive(0.9.0), hbase(0.94.3), hadoop(0.20.2)-单节点,zookeeper-3.4.3, guav -11.0.2, hive-hbase-handler-0.9.0

tutorials:-https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration

教程:https:/ /cwiki.apache.org/confluence/display/Hive/HBaseIntegration

steps 1) start hadoop, 2) start hbase-master 3) start hiveserver 4) start hive shell using --auxpath parameters as in tutorial (all works without errors - JobTracker,HRegionServer,HMaster,DataNode,NameNode,SecondaryNameNode,TaskTracker,HQuorumPeer,Jps)

步骤1)启动hadoop, 2)启动hbase-master 3)启动hiveserver 4)使用-auxpath参数启动hive shell,如教程(所有工作都没有错误——JobTracker,HRegionServer,HMaster,DataNode,NameNode,SecondaryNameNode,TaskTracker,HQuorumPeer,Jps)

hbase(main):001:0> status
1 servers, 0 dead, 2.0000 average load

On hive shell I create can create table as

在hive shell中,我可以创建一个as表

CREATE TABLE IF NOT EXISTS familia (id_familia INT,fk_veiculo INT,fk_cliente INT,nome STRING) ROW FORMAT delimited fields terminated by ',' STORED AS TEXTFILE;
load data local inpath '/home/trendwise/hive_data/tables_csv/familia.csv' overwrite into table familia;

but when I do below query,nothing shown,just cursor blinking.I waited for long time,then error shown

但是当我做下面的查询时,什么都没有显示,只是光标闪烁。我等了很长时间,然后出现了错误

CREATE TABLE hbase_familia_1 (key int, id_familia int, fk_veiculo INT,fk_cliente INT,nome STRING)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES("hbase.columns.mapping" = ":key, cf1:id_familia, cf2:fk_veiculo,cf3:fk_cliente, cf4:nome")
TBLPROPERTIES ("hbase.table.name" = "hbase_familia");

I did list on hbase shell,which didn't show any table what I tried ?

我在hbase shell上列出了列表,它没有显示任何表我尝试了什么?

Error:-

错误:-

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:73)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:147)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:398)
at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:538)
at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3305)
at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:242)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:134)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1326)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1118)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:258)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:215)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:406)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:689)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:557)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
) FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

hbase-site.xml

hbase-site.xml

<property>
 <name>hbase.rootdir</name>
 <value>hdfs://localhost:54310/hbase</value>
</property>
<property>
 <name>dfs.replication</name>
 <value>1</value>
</property>
<property>
 <name>hbase.zookeeper.property.dataDir</name>
 <value>/home/trendwise/hadoop/hbase-0.94.3/hbase_dataDir</value>
</property>
<property>
 <name>hbase.zookeeper.property.clientPort</name>
 <value>2222</value>
 <description>Property from ZooKeeper's config zoo.cfg.
 </description>
</property>
<property>
 <name>hbase.zookeeper.quorum</name>
 <value>localhost</value>
 <description></description>
</property>
<property>
 <name>hbase.cluster.distributed</name>
 <value>true</value>
 <description></description>
</property>

3 个解决方案

#1


0  

Change the line that has "127.0.1.1" in your /etc/hosts file to "127.0.0.1" and restart everything. Also, copy hbase-site.xml into the HIVE_HOME/conf directory.

将/etc/hosts文件中的“127.0.1.1”行更改为“127.0.0.1”,并重新启动所有内容。此外,hbase-site副本。xml到HIVE_HOME/conf目录。

#2


0  

Hbase is not able to start all of its daemons...so u might get a clue in hbase logs...see if u can find anything in the hbase logs and report that error...hope this works...

Hbase不能启动它的所有守护进程……所以你可能从hbase日志中得到线索……看看你是否能在hbase日志中找到任何东西并报告这个错误……希望这个工作…

#3


0  

It seems Hive is not able to find the required jar files

似乎Hive不能找到所需的jar文件

Try to execute the command with all the

尝试执行所有的命令。

hive –auxpath /path-to-/hive-examples.jar;other jar files too seperated by semicolon

jar;由分号分隔的其他jar文件

and then try putting the hbase conf file in hive conf directory.

然后尝试将hbase conf文件放入hive conf目录中。

and define aux path in hive-site.xml or in hive-env.sh and try

并在hive-site中定义aux路径。xml或hive-env。sh并尝试

these error are mostly due to hive being not able to connect to hadoop or hbase.

这些错误主要是由于hive不能连接到hadoop或hbase。

and also check all the daemons are running of hbase and you can perform all the opoeration on hbase shell.

并检查所有守护进程都在运行hbase,您可以在hbase shell上执行所有的opoeration。

#1


0  

Change the line that has "127.0.1.1" in your /etc/hosts file to "127.0.0.1" and restart everything. Also, copy hbase-site.xml into the HIVE_HOME/conf directory.

将/etc/hosts文件中的“127.0.1.1”行更改为“127.0.0.1”,并重新启动所有内容。此外,hbase-site副本。xml到HIVE_HOME/conf目录。

#2


0  

Hbase is not able to start all of its daemons...so u might get a clue in hbase logs...see if u can find anything in the hbase logs and report that error...hope this works...

Hbase不能启动它的所有守护进程……所以你可能从hbase日志中得到线索……看看你是否能在hbase日志中找到任何东西并报告这个错误……希望这个工作…

#3


0  

It seems Hive is not able to find the required jar files

似乎Hive不能找到所需的jar文件

Try to execute the command with all the

尝试执行所有的命令。

hive –auxpath /path-to-/hive-examples.jar;other jar files too seperated by semicolon

jar;由分号分隔的其他jar文件

and then try putting the hbase conf file in hive conf directory.

然后尝试将hbase conf文件放入hive conf目录中。

and define aux path in hive-site.xml or in hive-env.sh and try

并在hive-site中定义aux路径。xml或hive-env。sh并尝试

these error are mostly due to hive being not able to connect to hadoop or hbase.

这些错误主要是由于hive不能连接到hadoop或hbase。

and also check all the daemons are running of hbase and you can perform all the opoeration on hbase shell.

并检查所有守护进程都在运行hbase,您可以在hbase shell上执行所有的opoeration。