更新 hadoop HDFS 文件
我是 Hadoop 的新手。我一直读到 HDFS 主要是“一次写入,多次读取”。我有一个用例,我可能需要对 HDFS 中存储的文件进行修改。我一直在研究是否有任何方法可以做到这一点。
我的问题是是否可以将 HDFS 文件加载到 HBase 中,进行修改,然后将其保存回 HDFS 中,然后删除原始文件。如果可行的话请告诉我。
I am a newbie to Hadoop. I have been reading that HDFS is mostly about "writing once, reading any times". I have a use case where I may have to make modifications to the files stored in HDFS. I have been researching if there are any ways of doing this.
My question is will it be possible to load the HDFS file into HBase, do the modifications, and save it back in HDFS, and deleting the original file. Please let me if this feasible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您需要更新文件中的值,那么最好使用 HBase。您仍然可以通过 TableInputFormat 和 TableOutputFormat 在 MR 作业中使用 HBase 表。如果要附加数据,可以使用任何支持 hdfs 附加的 hadoop 版本,例如 0.20.205.0。
If you need to update values in a file you are much better of using HBase. You can still use your HBase table in your MR jobs via the TableInputFormat and TableOutputFormat. If you want to append data you can use any of the hadoop versions that support hdfs append such as 0.20.205.0.