Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8653E11750 for ; Fri, 19 Sep 2014 12:37:32 +0000 (UTC) Received: (qmail 32636 invoked by uid 500); 19 Sep 2014 12:37:28 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 32526 invoked by uid 500); 19 Sep 2014 12:37:28 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 32510 invoked by uid 99); 19 Sep 2014 12:37:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2014 12:37:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adarsh.deshratnam@gmail.com designates 209.85.223.182 as permitted sender) Received: from [209.85.223.182] (HELO mail-ie0-f182.google.com) (209.85.223.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2014 12:37:01 +0000 Received: by mail-ie0-f182.google.com with SMTP id y20so3330406ier.41 for ; Fri, 19 Sep 2014 05:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Vi0Xyo37lVftsB+qIxCwgLus4xMV0l+0Wc4nTslcjZc=; b=KtxKJJovn0F5b+U1oXHrKjcegOUHMdVzO1V3GF6jhMk6970GGxSTwXTpcYh8kgjHmz EY/H13D1ihCn6Hh9wGZAb6KtjrldJZh28zO/S/dY0LfSrG4ZbsX99/1bzy0I+J4FWFAD y+ViasqfnercNBvixcQ8qgsTbFdbMnCPzPTByqRISaBkbmjgPAVgvIK3dfgMlvIyunhk gh9/yPCLlc7KzUva3xOGyi1BSNQi3r6LlntCuYE6a/9bB4aMxZ59Sde1UoB+By+pBsgp 28nkbPYfKZqBaHRHInhqhNjZhXIRsrk+tyf4bTzO0dYXnB7r+1opcJGkYQWo4HWa9xWJ rXqQ== X-Received: by 10.42.204.76 with SMTP id fl12mr811396icb.80.1411130219454; Fri, 19 Sep 2014 05:36:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.250.9 with HTTP; Fri, 19 Sep 2014 05:36:39 -0700 (PDT) In-Reply-To: References: From: adarsh deshratnam Date: Fri, 19 Sep 2014 18:06:39 +0530 Message-ID: Subject: Re: Query regarding the replication factor in hadoop To: user , raghavchandra.learning@gmail.com Content-Type: multipart/alternative; boundary=20cf3040e2d676699405036a5b1b X-Virus-Checked: Checked by ClamAV on apache.org --20cf3040e2d676699405036a5b1b Content-Type: text/plain; charset=UTF-8 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 we try to write new data into hdfs at this point of time ? whether the write would be successful with only 2 data nodes and replication factor 3 or it returns any error message?* *Ans:*It will write successfully. For further info please refer below link: http://hadoop.apache.org/docs/r1.2.1/hdfs_design.html Thanks, Adarsh D On Fri, Sep 19, 2014 at 5:46 PM, Raghavendra Chandra < raghavchandra.learning@gmail.com> wrote: > 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 will be having 2 data nodes. > > Queries: > > 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. > > 2. What happens when we try to write new data into hdfs at this point of > time ? whether the write would be successful with only 2 data nodes and > replication factor 3 or it returns any error message? > > > These queries might be simple, but it would be really helpful if some one > can answer. > > Thanks and regards, > Raghav Chandra > > --20cf3040e2d676699405036a5b1b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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:=C2=A0As here the replication factor is t= hree. The data block will be replicated three time within 2 nodes. Block re= plication is random.

2. What happens when we try to write new= =C2=A0data into hdfs at this point of time ? whether the write would be su= ccessful with only 2 data nodes and replication factor 3 or it returns any = error message?
Ans:It will write successfully.

<= div style=3D"font-family:arial,sans-serif;font-size:12.7272720336914px">
For further info please refer below link:

<= div style=3D"font-family:arial,sans-serif;font-size:12.7272720336914px">
Thanks,
Adarsh D

On Fri, Sep 19, 2014 at 5:46 PM, Raghavendra Chandra <raghavchandra.learning@gmail.com> wrote:
Hi All,

I h= ave 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 f= actor is 3. So ideally each data node would =C2=A0get one replica .

Assume that meanwhile one of the data node went down.=C2= =A0

so ideally we will be having 2 data nodes.

Queries:

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.

2. What hap= pens when we try to write new =C2=A0data into hdfs at this point of time ? = whether the write would be successful with only 2 data nodes and replicatio= n factor 3 or it returns any error message?


These queries might be simple, but it would be really helpful if s= ome one can answer.

Thanks and regards,
= Raghav Chandra


--20cf3040e2d676699405036a5b1b--