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 81F981870F for ; Tue, 3 Nov 2015 11:09:28 +0000 (UTC) Received: (qmail 14788 invoked by uid 500); 3 Nov 2015 11:09:28 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 14725 invoked by uid 500); 3 Nov 2015 11:09:28 -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 14669 invoked by uid 99); 3 Nov 2015 11:09:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2015 11:09:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EA7B12C1F6E for ; Tue, 3 Nov 2015 11:09:27 +0000 (UTC) Date: Tue, 3 Nov 2015 11:09:27 +0000 (UTC) From: "Vinayakumar B (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8898) Create API and command-line argument to get quota without need to get file and directory counts 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-8898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987097#comment-14987097 ] Vinayakumar B commented on HDFS-8898: ------------------------------------- Thanks [~mingma] for the latest patch. It looks really nice. Below are some minor commments 1. {{DFSClient#getQuotaUsage(..)}} should call NN RPC inside Trace span. 2. {{DFSClient#getQuotaUsage(..)}} should call {{checkOpen()}} before going for NN RPC call 3. Option added to Count command needs document update. 4. Following code too is expected to be inside fsd lock. {code}src = fsd.resolvePath(pc, src, pathComponents); final INodesInPath iip = fsd.getINodesInPath(src, false); if (fsd.isPermissionEnabled()) { fsd.checkPermission(pc, iip, false, null, null, null, FsAction.READ_EXECUTE); }{code} 5. {{FSNamesystem#getQuotaUsage(..)}} needs formatting. > Create API and command-line argument to get quota without need to get file and directory counts > ----------------------------------------------------------------------------------------------- > > Key: HDFS-8898 > URL: https://issues.apache.org/jira/browse/HDFS-8898 > Project: Hadoop HDFS > Issue Type: Bug > Components: fs > Reporter: Joep Rottinghuis > Assignee: Ming Ma > Attachments: HDFS-8898-2.patch, HDFS-8898.patch > > > On large directory structures it takes significant time to iterate through the file and directory counts recursively to get a complete ContentSummary. > When you want to just check for the quota on a higher level directory it would be good to have an option to skip the file and directory counts. > Moreover, currently one can only check the quota if you have access to all the directories underneath. For example, if I have a large home directory under /user/joep and I host some files for another user in a sub-directory, the moment they create an unreadable sub-directory under my home I can no longer check what my quota is. Understood that I cannot check the current file counts unless I can iterate through all the usage, but for administrative purposes it is nice to be able to get the current quota setting on a directory without the need to iterate through and run into permission issues on sub-directories. -- This message was sent by Atlassian JIRA (v6.3.4#6332)