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 A4582200CF7 for ; Tue, 19 Sep 2017 10:21:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A2A341609E0; Tue, 19 Sep 2017 08:21:06 +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 E85211609DB for ; Tue, 19 Sep 2017 10:21:05 +0200 (CEST) Received: (qmail 10159 invoked by uid 500); 19 Sep 2017 08:21:05 -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 10145 invoked by uid 99); 19 Sep 2017 08:21:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Sep 2017 08:21:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4CC29CAE47 for ; Tue, 19 Sep 2017 08:21:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id FxRoh9BnD58E for ; Tue, 19 Sep 2017 08:21:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6E45F5FDBC for ; Tue, 19 Sep 2017 08:21:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 44187E0F67 for ; Tue, 19 Sep 2017 08:21:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 8FB15244CE for ; Tue, 19 Sep 2017 08:21:01 +0000 (UTC) Date: Tue, 19 Sep 2017 08:21:01 +0000 (UTC) From: "Mukul Kumar Singh (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11968) ViewFS: StoragePolicies commands fail with HDFS federation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 19 Sep 2017 08:21:06 -0000 [ https://issues.apache.org/jira/browse/HDFS-11968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171294#comment-16171294 ] Mukul Kumar Singh commented on HDFS-11968: ------------------------------------------ Thanks for the review [~surendrasingh], 1) ViewFileSystem#resolveStoragePolicyPath() why this method is required ?. fsState.resolve already throwing FileNotFoundException. Only thing is proper exception message is missing in fsState.resolve. bq. Fixed by modifying the message in fsState.resolve. 2) What is realId in BlockStoragePolicySpi? bq. As you have already noted, this was added to get the local policy id. With ViewFilesystem we cannot use the HdfsFileStatus. Hence I thought of adding another field to fetch the local policy id of the command. This also avoid two rpc calls one for a) getting the filestatus and b) for getting the list of all the storage policies for a namenode. I have updated the patch for 1) Please have a look and let me know of your comments. > ViewFS: StoragePolicies commands fail with HDFS federation > ---------------------------------------------------------- > > Key: HDFS-11968 > URL: https://issues.apache.org/jira/browse/HDFS-11968 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs > Affects Versions: 2.7.1 > Reporter: Mukul Kumar Singh > Assignee: Mukul Kumar Singh > Attachments: HDFS-11968.001.patch, HDFS-11968.002.patch, HDFS-11968.003.patch, HDFS-11968.004.patch, HDFS-11968.005.patch, HDFS-11968.006.patch, HDFS-11968.007.patch > > > hdfs storagepolicies command fails with HDFS federation. > For storage policies commands, a given user path should be resolved to a HDFS path and > storage policy command should be applied onto the resolved HDFS path. > {code} > static DistributedFileSystem getDFS(Configuration conf) > throws IOException { > FileSystem fs = FileSystem.get(conf); > if (!(fs instanceof DistributedFileSystem)) { > throw new IllegalArgumentException("FileSystem " + fs.getUri() + > " is not an HDFS file system"); > } > return (DistributedFileSystem)fs; > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org