Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 73A15200B96 for ; Thu, 6 Oct 2016 18:25:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 72193160AE0; Thu, 6 Oct 2016 16:25:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AEC4F160AC5 for ; Thu, 6 Oct 2016 18:25:21 +0200 (CEST) Received: (qmail 84113 invoked by uid 500); 6 Oct 2016 16:25:20 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 84095 invoked by uid 99); 6 Oct 2016 16:25:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 16:25:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 89BFF2C0D52 for ; Thu, 6 Oct 2016 16:25:20 +0000 (UTC) Date: Thu, 6 Oct 2016 16:25:20 +0000 (UTC) From: "Rushabh S Shah (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10921) TestDiskspaceQuotaUpdate doesn't wait for NN to get out of safe mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 06 Oct 2016 16:25:22 -0000 [ https://issues.apache.org/jira/browse/HDFS-10921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15552396#comment-15552396 ] Rushabh S Shah commented on HDFS-10921: --------------------------------------- bq. So the only problem that we have is the issue that Rushabh S Shah raised about Namesystem pollution by bad tests. I looked at the code. {code:title=FSNamesystem.java|borderStyle=solid} /** * Clear all loaded data */ void clear() { dir.reset(); dtSecretManager.reset(); leaseManager.removeAllLeases(); snapshotManager.clearSnapshottableDirs(); cacheManager.clear(); ecPolicyManager.clear(); setImageLoaded(false); blockManager.clear(); } {code} bq. setImageLoaded(false); This line from {{clear()}} method is the problem. {code:title=FSDirectory.java|borderStyle=solid} void updateCount(INodesInPath iip, int numOfINodes, QuotaCounts counts, boolean checkQuota) throws QuotaExceededException { assert hasWriteLock(); if (!namesystem.isImageLoaded()) { //still initializing. do not check or update quotas. return; } if (numOfINodes > iip.length()) { numOfINodes = iip.length(); } if (checkQuota && !skipQuotaCheck) { verifyQuota(iip, numOfINodes, counts, null); } unprotectedUpdateCount(iip, numOfINodes, counts); } {code} {quote} if (!namesystem.isImageLoaded()) \{ //still initializing. do not check or update quotas. return; \} {quote} While creating a directory or file, it tries to update the usageCount. But since in the {{FSNamesystem#clear()}}, we set the imageLoaded flag to false, the {{FSDirectory#updateCount}} will return and {{FSDirectory#unprotectedUpdateCount}} wont be called and the usage count will not be updated. One thing we can do is: After calling FSNamesystem#clear in the @Before block, we can call {{cluster.getNamesystem().setImageLoaded(true);}} I just tried running one test case {{TestDiskspaceQuotaUpdate#testQuotaIssuesWhileCommitting}} and it passed. Hope this helps. > TestDiskspaceQuotaUpdate doesn't wait for NN to get out of safe mode > -------------------------------------------------------------------- > > Key: HDFS-10921 > URL: https://issues.apache.org/jira/browse/HDFS-10921 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Eric Badger > Assignee: Eric Badger > Attachments: HDFS-10921.001.patch, HDFS-10921.002.patch > > > Test fails intermittently because the NN is still in safe mode. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org