Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hive connection hbase external table error what to do

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you the "hive connection hbase external table error how to do", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "hive connection hbase external table error how to do" this article.

Execute the external table that creates the hbase in hive, and execute the creation script:

Hive > CREATE EXTERNAL TABLE hbase_userFace (id string, mobile string,name string) > STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ": key,faces:mobile,faces:name") > TBLPROPERTIES ("hbase.table.name" = "userFace")

The error is as follows:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException (message:org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations (RpcRetryingCallerWithReadReplicas.java:312) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call (ScannerCallableWithReplicas.java:153) at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call (ScannerCallableWithReplicas.java:61) at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries (RpcRetryingCaller.java:200) ) at org.apache.hadoop.hbase.client.ClientScanner.call (ClientScanner.java:320) at org.apache.hadoop.hbase.client.ClientScanner.nextScanner (ClientScanner.java:295) at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction (ClientScanner.java:160) at org.apache.hadoop.hbase.client.ClientScanner. (ClientScanner.java:155) at org.apache.hadoop.hbase.client.HTable.getScanner (HTable Java: 811) at org.apache.hadoop.hbase.MetaTableAccessor.fullScan (MetaTableAccessor.java:602) at org.apache.hadoop.hbase.MetaTableAccessor.tableExists (MetaTableAccessor.java:366) at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists (HBaseAdmin.java:303) at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists (HBaseAdmin.java:313) at org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable ( HBaseStorageHandler.java:200) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable (HiveMetaStoreClient.java:664) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable (HiveMetaStoreClient.java:657) at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethod) 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:156) at com.sun.proxy.$Proxy8.createTable (Unknown Source) at org.apache.hadoop.hive.ql.metadata.Hive.createTable (Hive.java:714) at org.apache.hadoop.hive.ql.exec.DDLTask.createTable (DDLTask.java:4135) at org.apache.hadoop.hive .ql.exec.DDLTask.execute (DDLTask.java:306) at org.apache.hadoop.hive.ql.exec.Task.executeTask (Task.java:160) at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential (TaskRunner.java:88) at org.apache.hadoop.hive.ql.Driver.launchTask (Driver.java:1653) at org.apache.hadoop.hive.ql.Driver.execute (Driver.java:1412) At org.apache.hadoop.hive.ql.Driver.runInternal (Driver.java:1195) at org.apache.hadoop.hive.ql.Driver.run (Driver.java:1059) at org.apache.hadoop.hive.ql.Driver.run (Driver.java:1049) at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd (CliDriver.java:213) at org.apache.hadoop.hive.cli.CliDriver.processCmd (CliDriver. Java:165) at org.apache.hadoop.hive.cli.CliDriver.processLine (CliDriver.java:376) at org.apache.hadoop.hive.cli.CliDriver.executeDriver (CliDriver.java:736) at org.apache.hadoop.hive.cli.CliDriver.run (CliDriver.java:681) at org.apache.hadoop.hive.cli.CliDriver.main (CliDriver.java:621) at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethod) 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.run (RunJar.java:221) at org.apache.hadoop.util.RunJar.main (RunJar.java:136))

The error should not be connected to hbase,hbase, which is managed by zookeeper. Do the following test:

1. Test the connection of a single-node hbase

$hive-hiveconf hbase.master=master:60000

After entering the cli of hive, execute the script to create the external table and find that the error is still reported.

two。 Test the connection of the cluster hbase

Hive-hiveconf hbase.zookeeper.quorum=slave1,slave2,master,slave4,slave5,slave6,slave7

After entering the cli of hive, execute the script to create the external table and find that the creation is successful.

Thus, it is hive that made an error in reading the zookeeper of hbase. Look in the hive-site.xml file and see a property named hive.zookeeper.quorum, and make a copy of the property changed to hbase.zookeeper.quorum. As follows:

Hbase.zookeeper.quorum slave1,slave2,master,slave4,slave5,slave6,slave7

At this point, the problem is solved and the hbase external table is created successfully.

The above is all the contents of the article "what to do about external table errors in hive connection hbase". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report