hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-11968) ViewFS: StoragePolicies commands fail with HDFS federation
Date Mon, 02 Oct 2017 21:41:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16188892#comment-16188892
] 

Arpit Agarwal edited comment on HDFS-11968 at 10/2/17 9:40 PM:
---------------------------------------------------------------

Thanks [~msingh]. Your patch looks good to me. We can fix the behavior introduced by HDFS-13272
separately.

Two minor comments, but I am +1 basically.
# The {{instanceof}} check is unnecessary. You can just print the policy object if it is non-null.
{code}
+          if ((policy != null) && (policy instanceof BlockStoragePolicy)) {
             System.out.println("\t" + policy);
{code}
# The following error should go to stderr (via System.err.println)
{code}
        System.out.println(getName() + " is not supported for filesystem "
            + fs.getScheme() + " on path " + path);
{code}



was (Author: arpitagarwal):
Thanks [~msingh]. Your patch looks good to me. We can fix the behavior introduced by HDFS-13272.

Two minor comments, but I am +1 basically.
# The {{instanceof}} check is unnecessary. You can just print the policy object if it is non-null.
{code}
+          if ((policy != null) && (policy instanceof BlockStoragePolicy)) {
             System.out.println("\t" + policy);
{code}
# The following error should go to stderr (via System.err.println)
{code}
        System.out.println(getName() + " is not supported for filesystem "
            + fs.getScheme() + " on path " + path);
{code}


> 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-11968.008.patch,
HDFS-11968.009.patch, HDFS-11968.010.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


Mime
View raw message