Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF1C117ACE for ; Thu, 27 Aug 2015 22:45:46 +0000 (UTC) Received: (qmail 49646 invoked by uid 500); 27 Aug 2015 22:45:46 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 49465 invoked by uid 500); 27 Aug 2015 22:45:46 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 49243 invoked by uid 99); 27 Aug 2015 22:45:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2015 22:45:45 +0000 Date: Thu, 27 Aug 2015 22:45:45 +0000 (UTC) From: "Haohui Mai (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (HDFS-8982) Consolidate getFileReplication and getPreferredBlockReplication in INodeFile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-8982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Haohui Mai resolved HDFS-8982. ------------------------------ Resolution: Won't Fix The behavior is expected. {{getFileReplication()}} records the replication factor of the "current" (w.r.t. snapshot state) replicate factor of the file. The so-called {{getPerferredBlockReplication()}} records the maximum replication factor of the file w.r.t. the current and all snapshot state of the file. > Consolidate getFileReplication and getPreferredBlockReplication in INodeFile > ---------------------------------------------------------------------------- > > Key: HDFS-8982 > URL: https://issues.apache.org/jira/browse/HDFS-8982 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 2.7.1 > Reporter: Zhe Zhang > > Currently {{INodeFile}} provides both {{getFileReplication}} and {{getPreferredBlockReplication}} interfaces. At the very least they should be renamed (e.g. {{getCurrentFileReplication}} and {{getMaxConfiguredFileReplication}}), with clearer Javadoc. > I also suspect we are not using them correctly in all places right now. -- This message was sent by Atlassian JIRA (v6.3.4#6332)