读取4个表并写入1个Hbase表。如何?
如何在一个程序中读取4个表并写入1个Hbase表?是否可以?给我一些示例编码。
How to Read 4 tables and write into 1 Hbase Table in one program? is it possible? Give me some sample coding.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答是:是。
稍长的版本是:取决于。
我们对你的情况几乎一无所知。这使得很难给出更有意义的答案。
我有一个 Hadoop 作业,它运行一个使用 4 个表的 Hive 查询,并将结果放入 hive 中。
我已经用 3 种不同的方式实现了这个过程。
有可能......但没有足够的有关您的案件的信息来提供更多帮助。
寻求帮助时,最好包括您已经做过的事情或正在考虑的事情,以便人们知道该解决什么问题。我已经使用 Hive 作为我的 4 个表的源,也许你正在使用 MySQL...我关于 Hive 的答案可能几乎毫无用处。
编辑:在“更新”您的条件后:
你尝试了什么?
你哪里遇到麻烦了?
作为起点,我会查看 org.apache.hadoop.hbase 和 org.apache.hadoop.hbase.client 包以查看它们包含的内容并进行搜索例如使用
HTable
和HBaseConfiguration
等类。如果您提供已采取的步骤、已尝试过的操作以及遇到的问题,效果会更好。这使得 SO 的成员能够帮助您解决您的情况;而不是要求为你解决它(显然是从头到尾)。
The short answer is: Yes.
The slightly longer version is: Depends.
We know next to nothing about your situation. This makes it very hard to give a more meaningful answer.
I have a Hadoop job that runs a Hive query that uses 4 tables and the results are put into hive.
I've implemented this exact process 3 different ways.
It's possible... but there isn't enough information about your case to be of any more help.
When asking for help, it's best to include what you've done or what you are considering so people know what to address. I've used Hive as the source for my 4 tables, maybe you are using MySQL... my answer relating to hive coulb be next to useless.
EDIT: Following the 'update' to your conditions:
What have you tried?
Where are you having trouble?
As a starting point, I'd look at the
org.apache.hadoop.hbase
andorg.apache.hadoop.hbase.client
package to see what they contain and search for examples using classes such asHTable
andHBaseConfiguration
.It works better when you provide the steps you've taken, what you've tried and the trouble you've run into. That allows members of SO to help you with your situation; instead of asking that it be solved (apparently start to finish) for you.