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 D610410070 for ; Fri, 17 Apr 2015 07:26:19 +0000 (UTC) Received: (qmail 91754 invoked by uid 500); 17 Apr 2015 07:11:53 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 66001 invoked by uid 500); 17 Apr 2015 07:11:37 -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 52472 invoked by uid 99); 17 Apr 2015 05:10:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2015 05:10:59 +0000 Date: Fri, 17 Apr 2015 05:10:59 +0000 (UTC) From: "Jagadesh Kiran N (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8159) [HDFS-Quota] Verification is not done while setting dir namequota and size 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-8159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499259#comment-14499259 ] Jagadesh Kiran N commented on HDFS-8159: ---------------------------------------- Thanks for the clarification Allen Wittenauer & Arpit Agarwal . > [HDFS-Quota] Verification is not done while setting dir namequota and size > -------------------------------------------------------------------------- > > Key: HDFS-8159 > URL: https://issues.apache.org/jira/browse/HDFS-8159 > Project: Hadoop HDFS > Issue Type: Improvement > Components: HDFS > Affects Versions: 2.6.0 > Environment: Suse 11 SP3 > Reporter: Jagadesh Kiran N > Priority: Minor > > Name Quota and space quota is not verifying when setting a new value to a directory which already has subdirectories or contents. > Below are the steps to re-produce the cases: > *+Case-1+* > Step-1) Create a New folder > hdfs dfs -mkdir /test > Step-2) Create sub folders > hdfs dfs -mkdir /test/one > hdfs dfs -mkdir /test/two > hdfs dfs -mkdir /test/three > Step-3) Set Name Quota as two > hdfs dfsadmin -setQuota 2 /test > Step-3) Quota will be set with out the validating the dirs > +Output:+ Eventhough name quota value is lower than the existing number of dirs, its not validating and allowing to set the new value. > +Suggestion:+ Validate the name quota against the number of contents before setting the new value. > *+Case-2+* > Step-1) Add any new folder or file , it will give error message > mkdir: The NameSpace quota (directories and files) of directory /test is exceeded: quota=2 file count=5 > Step-2) Clear the Quota > hdfs dfsadmin -clrQuota /test > Step-3) Now Set the Size less than the folder size > hdfs dfsadmin -setSpaceQuota 10 /test > +Output:+ Eventhough space quota value is less than the size of the existing dir contents, its not validating and allowing to set the new value. > +Suggestion:+ Validate the quota against the used space before setting the new value. -- This message was sent by Atlassian JIRA (v6.3.4#6332)