Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About hadoop hdfs filesystem rename

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.

like image 410
lucky_start_izumi Avatar asked Oct 26 '25 02:10

lucky_start_izumi


1 Answers

Rename is a metadata-only operation in HDFS. Therefore it is be very cheap like it is in a normal POSIX filesystem, too. No data is moved. The only server involved is the namenode.

The source code for the rename can be found here. Pretty straight forward.

like image 167
dmeister Avatar answered Oct 28 '25 17:10

dmeister



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!