关于hadoop hdfs文件系统重命名 [英] About hadoop hdfs filesystem rename

查看:2113
本文介绍了关于hadoop hdfs文件系统重命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将大量数据存储到hdfs中。我需要将文件从一个文件夹移动到另一个文件夹。



我可以问一般文件系统重命名方法的成本是多少?
说我有移动数TB的数据。



非常感谢你。


解决方案

如果实施正确,在HDFS或任何文件系统中移动文件涉及对名称空间的更改而不移动实际数据。通过代码只改变Name节点中的名称空间(内存和编辑日志)。



NameNode.java NameNode控制两个关键表:

  • 1)filename->
    $ b

    • blocksequence(命名空间)

    • 2)嵌段 - > machinelist( 索引节点)



    只有第一部分需要修改,块到机器列表不一定是。我没有尝试过,但我想这应该是OK。


    I am storing lots of data into hdfs. And I need to move the files from one folder to another.

    May I ask generally how much is the cost of filesystem's rename method? Say I have to move terabytes of data.

    Thank you very much.

    解决方案

    Moving files in HDFS or any file system if implemented properly involves changes to the name space and not moving of the actual data. Going through the code only changes in the name space (memory and edit log) in the Name node are done.

    From the NameNode.java class

    • The NameNode controls two critical tables:
    • 1) filename->blocksequence (namespace)
    • 2) block->machinelist ("inodes")

    Only the first part needs to be modified, block to machine list need not be. I haven't tried it out, but I guess it should be OK.

    这篇关于关于hadoop hdfs文件系统重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆