更新 hadoop HDFS 文件

发布于 2025-01-01 08:14:34 字数 177 浏览 2 评论 0原文

我是 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 技术交流群。

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

发布评论

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

评论(1

只想待在家 2025-01-08 08:14:34

如果您需要更新文件中的值,那么最好使用 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.

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