使用 Hbase 配置 Hive

发布于 2024-12-17 04:25:15 字数 130 浏览 2 评论 0原文

我需要使用 hive 在 HBase 上执行查询。我已经下载了 HBase 和 hive,我的 HMaster 运行良好;我需要知道需要对 hive 进行哪些配置更改才能与 HBase 作为后端数据库一起使用。任何链接教程将不胜感激。 提前致谢。

I need to execute queries on HBase using hive. I have downloaded the HBase and hive my HMaster is running fine; I need to know what configuration changes I need to do for hive to work with HBase as the back end database. Any link tutorial will be appreciated.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自演自醉 2024-12-24 04:25:15

apache Hive wiki 很好地解释了它 https://cwiki.apache.org/confluence/display/ Hive/HBaseIntegration

要创建从 hive 管理的 HBase 表,请尝试类似

CREATE TABLE hive_managed(key string, value1 string, value2 int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,columnFamilyName:val1,columnFamilyName:val2")
TBLPROPERTIES ("hbase.table.name" = "hivemanaged");

* 编辑的以下评论

The apache Hive wiki explains it nicely https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration

To create an HBase table that is managed from hive try something like

CREATE TABLE hive_managed(key string, value1 string, value2 int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,columnFamilyName:val1,columnFamilyName:val2")
TBLPROPERTIES ("hbase.table.name" = "hivemanaged");

*edited following comment

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文