Query regarding the replication factor in hadoop

2014-09-19 Thread Raghavendra Chandra
Hi All, I have one very basic query regarding the replication factor in HDFS. Scenario: I have 4 node cluster : 3 data nodes and 1 master node. The replication factor is 3. So ideally each data node would get one replica . Assume that meanwhile one of the data node went down. so ideally we

Re: Query regarding the replication factor in hadoop

2014-09-19 Thread Shahab Yunus
Your write will not succeed. You will get an exception like could only be replicated to 0 nodes, instead of 1 More details here: http://www.bigdataplanet.info/2013/10/Hadoop-Tutorial-Part-4-Write-Operations-in-HDFS.html

Re: Query regarding the replication factor in hadoop

2014-09-19 Thread adarsh deshratnam
1. *How hadoop will take care of balancing of replicas as the required replicas are 3 , but we have only 2 data nodes up and running.* *Ans:* As here the replication factor is three. The data block will be replicated three time within 2 nodes. Block replication is random. *2. What happens when

Re: Query regarding the replication factor in hadoop

2014-09-19 Thread Abirami V
You will get under replicated block and missing replicas when you run hdfs fsck / you may see info like the following Under replicated blk_-4791859336845413240_1544. Target Replicas is 3 but found 2 replica(s). On Fri, Sep 19, 2014 at 5:36 AM, adarsh deshratnam adarsh.deshrat...@gmail.com

Re: Query regarding the replication factor in hadoop

2014-09-19 Thread Shahab Yunus
Interesting. I thought that the write would fail in case if # of nodes downs is greater than min-replication property. So in reality we only get a warning while writing (and a info message through fsck.) Regards, Shahab On Fri, Sep 19, 2014 at 9:26 AM, Abirami V abiramipand...@gmail.com wrote: