Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 391E617D7B for ; Mon, 6 Apr 2015 21:29:19 +0000 (UTC) Received: (qmail 87899 invoked by uid 500); 6 Apr 2015 21:29:14 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 87844 invoked by uid 500); 6 Apr 2015 21:29:14 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 87832 invoked by uid 99); 6 Apr 2015 21:29:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 21:29:13 +0000 Date: Mon, 6 Apr 2015 21:29:13 +0000 (UTC) From: "Yongjun Zhang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5215) dfs.datanode.du.reserved is not taking effect as it's not considered while getting the available space 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-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481985#comment-14481985 ] Yongjun Zhang commented on HDFS-5215: ------------------------------------- Hi [~brahmareddy], Sorry for the delay, I was buried in other stuff. I agree with [~sinago] that including rbwReserved is reasonable. Suggest to change the comment 1. remove {{* the freeSpace is now excluding reserved + rbw after HDFS-5215 }} and add comments like blow {code} final long usedSpace; // size of space used by HDFS final long freeSpace; // size of free space excluding reserved space final long reservedSpace; // size of space reserved for non-HDFS and RBW {code} 2. {code} /** * Return either the configured capacity of the file system if configured; * or the capacity of the file system excluding space reserved for non-HDFS. * @return the unreserved number of bytes left in this filesystem. May be zero. */ @VisibleForTesting public long getCapacity() { {code} 3. {code} /* * Calculate the available space of the filesystem, excluding space reserved * for non-HDFS and space reserved for RBW * * @return the available number of bytes left in this filesystem. May be zero. */ @Override public long getAvailable() throws IOException { {code} Thanks. > dfs.datanode.du.reserved is not taking effect as it's not considered while getting the available space > ------------------------------------------------------------------------------------------------------ > > Key: HDFS-5215 > URL: https://issues.apache.org/jira/browse/HDFS-5215 > Project: Hadoop HDFS > Issue Type: Bug > Components: datanode > Affects Versions: 3.0.0 > Reporter: Brahma Reddy Battula > Assignee: Brahma Reddy Battula > Attachments: HDFS-5215-002.patch, HDFS-5215-003.patch, HDFS-5215-004.patch, HDFS-5215.patch > > > {code}public long getAvailable() throws IOException { > long remaining = getCapacity()-getDfsUsed(); > long available = usage.getAvailable(); > if (remaining > available) { > remaining = available; > } > return (remaining > 0) ? remaining : 0; > } > {code} > Here we are not considering the reserved space while getting the Available Space. -- This message was sent by Atlassian JIRA (v6.3.4#6332)