You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Gabor Bota (JIRA)" <ji...@apache.org> on 2018/06/19 15:35:00 UTC

[jira] [Resolved] (HDFS-13683) HDFS StoragePolicy commands should work with Federation

     [ https://issues.apache.org/jira/browse/HDFS-13683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabor Bota resolved HDFS-13683.
-------------------------------
    Resolution: Duplicate

> HDFS StoragePolicy commands should work with Federation
> -------------------------------------------------------
>
>                 Key: HDFS-13683
>                 URL: https://issues.apache.org/jira/browse/HDFS-13683
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs, tools
>    Affects Versions: 3.0.0
>            Reporter: Gabor Bota
>            Assignee: Gabor Bota
>            Priority: Major
>
> In a federated cluster (defaultFS = viewfs://cluster3), getStoragePolicy with hdfs uri will run into the following error:
> {noformat}
> [root@cdh6-0-0-centos73-17443-1 ~]# hdfs storagepolicies -getStoragePolicy -path hdfs://ns2/hbase/WALs/cdh6-0-0-centos73-17443-4.vpc.cloudera.com,22101,1527272361896
> IllegalArgumentException: Wrong FS: hdfs://ns2/hbase/WALs/cdh6-0-0-centos73-17443-4.vpc.cloudera.com,22101,1527272361896, expected: viewfs://cluster3/
> {noformat}
> Taking a quick look at the code, I think [this|https://github.com/apache/hadoop/blob/3e37a9a70ba93430da1b47f2a8b50358348396b0/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/StoragePolicyAdmin.java#L106] is the culprit:
> {code}
>  final FileSystem fs = FileSystem.get(conf);
> // should do: final FileSystem fs = p.getFilesystem(conf);
> {code}
> We should have a review of all shell and see if anything else is missing. At the minimum, we should fix all places in StoragePolicyAdmin.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org