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 C8D5B200BBC for ; Sun, 13 Nov 2016 17:27:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C75D1160B12; Sun, 13 Nov 2016 16:27:00 +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 25746160AE4 for ; Sun, 13 Nov 2016 17:26:59 +0100 (CET) Received: (qmail 401 invoked by uid 500); 13 Nov 2016 16:26:59 -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 378 invoked by uid 99); 13 Nov 2016 16:26:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Nov 2016 16:26:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 20FDE2C4C70 for ; Sun, 13 Nov 2016 16:26:59 +0000 (UTC) Date: Sun, 13 Nov 2016 16:26:59 +0000 (UTC) From: "Rakesh R (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10802) [SPS]: Add satisfyStoragePolicy API in HdfsAdmin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 13 Nov 2016 16:27:01 -0000 [ https://issues.apache.org/jira/browse/HDFS-10802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15661722#comment-15661722 ] Rakesh R commented on HDFS-10802: --------------------------------- Thank you [~yuanbo] for the patch. Could you please look at the following comments on yor patch. # It is good to mention that the "API is non-recursive in nature". The subdirectories of the path won't be considered for satisfying the storage policy. {code} /** + * Set the source path to satisfy storage policy. + * @param path The source path referring to either a directory or a file. + * @throws IOException + */ {code} # Presently, SPS will throw following exception if the path is a directory. We need to add logic to iterate all the files under the given directory and add it to {{bm.satisfyStoragePolicy(inode.getId());}}. There are two cases (1) multiples files under a directory (2) sub-directories will be ignored. {code} java.lang.IllegalStateException: Current inode is not a file: root1(INodeDirectory@f6a28bf), parentDir=/ at org.apache.hadoop.hdfs.server.namenode.INode.asFile(INode.java:321) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockCollection(FSNamesystem.java:3337) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockCollection(FSNamesystem.java:1) at org.apache.hadoop.hdfs.server.namenode.StoragePolicySatisfier.computeAndAssignStorageMismatchedBlocksToDNs(StoragePolicySatisfier.java:146) {code} # Can we add test case to verify that, this API will throw exception if storage policy is disabled. # It seems test failures are related. Please look at these failures. For eg. {{TestOfflineEditsViewer.testStored}}, {{TestOfflineEditsViewer.testGenerated}}, {{TestDFSInotifyEventInputStream}} etc. # Also, please fix necessary checkstyle warnings. > [SPS]: Add satisfyStoragePolicy API in HdfsAdmin > ------------------------------------------------ > > Key: HDFS-10802 > URL: https://issues.apache.org/jira/browse/HDFS-10802 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs-client > Reporter: Uma Maheswara Rao G > Assignee: Yuanbo Liu > Attachments: HDFS-10802-HDFS-10285.001.patch, HDFS-10802.001.patch > > > This JIRA is to track the work for adding user/admin API for calling to satisfyStoragePolicy -- 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