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 3E5477E88 for ; Fri, 22 Jul 2011 10:46:24 +0000 (UTC) Received: (qmail 77626 invoked by uid 500); 22 Jul 2011 10:46:20 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 76228 invoked by uid 500); 22 Jul 2011 10:46:03 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 74359 invoked by uid 99); 22 Jul 2011 10:45:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2011 10:45:57 +0000 X-ASF-Spam-Status: No, hits=3.6 required=5.0 tests=FS_REPLICA,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [147.102.222.220] (HELO diomedes.noc.ntua.gr) (147.102.222.220) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2011 10:45:48 +0000 Received: from [147.102.19.183] (dhcp19-34.telecom.ece.ntua.gr [147.102.19.183]) (authenticated bits=0) by diomedes.noc.ntua.gr (8.14.4/8.14.4) with ESMTP id p6MAjQRb039357 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Fri, 22 Jul 2011 13:45:27 +0300 (EEST) (envelope-from gkousiou@mail.ntua.gr) Message-ID: <4E2954BD.8050605@mail.ntua.gr> Date: Fri, 22 Jul 2011 13:45:17 +0300 From: George Kousiouris User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: common-user@hadoop.apache.org CC: Ivan Balashov Subject: Re: Issue with obtaining actual replication factor References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (diomedes.noc.ntua.gr [147.102.222.220]); Fri, 22 Jul 2011 13:45:27 +0300 (EEST) X-Virus-Scanned: clamav-milter 0.97 at diomedes.noc.ntua.gr X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Hi, One way would be through the fsck command and parsing the output (troublesome, could also be a more specific api call for that that I am not aware of). There you can see the replication factor that is set and the actual replication status. However in general after setting a new value the replication follows this setting. It may take a while for this to happen (probably depending on the background hadoop daemons and their refresh interval) but in the end it does change. BR, George On 7/22/2011 1:39 PM, Ivan Balashov wrote: > Hi, > > Is there a way to make sure that file's replication factor has indeed > been changed after FileSystem.setReplication call? > > The issue is that FileSystem.getFileStatus seems to return newly set > value, and NOT actual replication status (actual number of file > copies). > > Could anyone suggest how we can get *actual* replication factor for a > file, i.e. number of fully replicated file copies? > > Thanks! > - Ivan > > -- --------------------------- George Kousiouris Electrical and Computer Engineer Division of Communications, Electronics and Information Engineering School of Electrical and Computer Engineering Tel: +30 210 772 2546 Mobile: +30 6939354121 Fax: +30 210 772 2569 Email: gkousiou@mail.ntua.gr Site: http://users.ntua.gr/gkousiou/ National Technical University of Athens 9 Heroon Polytechniou str., 157 73 Zografou, Athens, Greece