Return-Path: Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: (qmail 13905 invoked from network); 6 Mar 2010 00:06:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Mar 2010 00:06:03 -0000 Received: (qmail 32430 invoked by uid 500); 6 Mar 2010 00:05:48 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 32371 invoked by uid 500); 6 Mar 2010 00:05:48 -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 32353 invoked by uid 99); 6 Mar 2010 00:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 00:05:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 00:05:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 57B1E234C4CE for ; Sat, 6 Mar 2010 00:05:27 +0000 (UTC) Message-ID: <1961940302.110531267833927358.JavaMail.jira@brutus.apache.org> Date: Sat, 6 Mar 2010 00:05:27 +0000 (UTC) From: "Eli Collins (JIRA)" To: hdfs-dev@hadoop.apache.org Subject: [jira] Created: (HDFS-1026) Quota checks fail for small files and quotas MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Quota checks fail for small files and quotas -------------------------------------------- Key: HDFS-1026 URL: https://issues.apache.org/jira/browse/HDFS-1026 Project: Hadoop HDFS Issue Type: Bug Affects Versions: 0.20.2, 0.20.1, 0.20.3, 0.21.0, 0.22.0 Reporter: Eli Collins Fix For: 0.20.3, 0.22.0 If a directory has a quota less than blockSize * numReplicas then you can't add a file to it, even if the file size is less than the quota. This is because FSDirectory#addBlock updates the count assuming at least one block is written in full. We don't know how much of the block will be written when addBlock is called and supporting such small quotas is not important so perhaps we should document this and log an error message instead of making small (blockSize * numReplicas) quotas work. {code} // check quota limits and updated space consumed updateCount(inodes, inodes.length-1, 0, fileINode.getPreferredBlockSize()*fileINode.getReplication(), true); {code} You can reproduce with the following commands: {code} $ dd if=/dev/zero of=temp bs=1000 count=64 $ hadoop fs -mkdir /user/eli/dir $ hdfs dfsadmin -setSpaceQuota 191M /user/eli/dir $ hadoop fs -put temp /user/eli/dir # Causes DSQuotaExceededException {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.