Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 960861172F for ; Fri, 19 Sep 2014 12:35:24 +0000 (UTC) Received: (qmail 20437 invoked by uid 500); 19 Sep 2014 12:35:20 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 20325 invoked by uid 500); 19 Sep 2014 12:35:20 -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 20315 invoked by uid 99); 19 Sep 2014 12:35:19 -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:35:19 +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 shahab.yunus@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2014 12:34:54 +0000 Received: by mail-lb0-f175.google.com with SMTP id n15so3011548lbi.20 for ; Fri, 19 Sep 2014 05:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ebB3I59gbYojxUd5fZZNhhKSCRQStG9mwbBqxok8VUg=; b=Lqcahl/7Ab8ZPzakzaQTPSKZa3RZQlFw6Ln53EFovtSjnF92b1rYFna4Pic1GFKRQ7 CBgjFlz/EH6LnTkokwgLqgFA7O9ENUmkN0/A7SLRGJbknfgDtOlFqYNfKu3EjyfAhSyN Nb2wRHEDXJnAz/zoFK+6Zs8ZOeM0wqwvXjIxclR7RMaMt7mbnUQjWZkeKqZFjLrmOEWv 67pmqN92/MLq4HbOWECgAf1khEfq4gNW1cyaIDfwxrRKlRosKMTfH9IttIX8zObtsCLx /6p5RK0I1UoS478vqqvxqcO1nxc5kBd7SzANCngDW8FrYaokDOJ4L4sGwIjmUa0OMQiB F3Cg== MIME-Version: 1.0 X-Received: by 10.112.180.137 with SMTP id do9mr6091569lbc.63.1411130092846; Fri, 19 Sep 2014 05:34:52 -0700 (PDT) Received: by 10.25.33.145 with HTTP; Fri, 19 Sep 2014 05:34:52 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Sep 2014 08:34:52 -0400 Message-ID: Subject: Re: Query regarding the replication factor in hadoop From: Shahab Yunus To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=001a11c25c3eea832a05036a5389 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c25c3eea832a05036a5389 Content-Type: text/plain; charset=UTF-8 Your write will not succeed. You will get an exception like "xxxx 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 http://cloudcelebrity.wordpress.com/2013/11/25/handling-hadoop-error-could-only-be-replicated-to-0-nodes-instead-of-1-during-copying-data-to-hdfs-or-with-mapreduce-jobs/ http://wiki.apache.org/hadoop/CouldOnlyBeReplicatedTo Regards, Shahab On Fri, Sep 19, 2014 at 8:16 AM, 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 > > --001a11c25c3eea832a05036a5389 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On= Fri, Sep 19, 2014 at 8:16 AM, Raghavendra Chandra <raghavc= handra.learning@gmail.com> wrote:
Hi All,

I have one very basic qu= ery regarding the replication factor in HDFS.

Scen= ario:

I have 4 node cluster : 3 data nodes and 1 m= aster node.

The replication factor is 3. So ideall= y each data node would =C2=A0get one replica .

Ass= ume 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 happens when we try to wr= ite new =C2=A0data into hdfs at this point of time ? whether the write woul= d be successful with only 2 data nodes and replication factor 3 or it retur= ns any error message?


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

Thanks and regards,
Raghav Chandra


--001a11c25c3eea832a05036a5389--