How replication works in hadoop

I am new to hadoop, I am moving to the concept of hdfs and replication so I have a question related to this:

Suppose I don't change the replication factor in hdfs-site.xml, so I keep it by default 3. what if I create a cluster of 3 machines: 1 master 2 slave

this means there will be 2 data nodes there, since I have a replication factor of 3, but I have 2 data nodes to store this data

how do these scripts work?

will he make 3 copies or 2 copies? will it create any problems? will he warn?

+3


source to share


1 answer


It will create 2 copies. This shouldn't cause any problems, but if you run a filesystem check (fsck), you will receive a warning that some blocks are being replicated.



0


source







All Articles