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

Vinayakumar B commented on HDFS-11177:
--------------------------------------

Thanks for the patch [~surendrasingh].
Patch mostly looks good to me. Some nits to update.

1. Variable name can be something different than {{path2}}. it can be just 
{{p}}.
 {code}Path path2 = new Path(path);{code}

2. Instead of directly replacing the current assertions with fully qualified 
path, better to add separate assertions with full qualified path. Let current 
assertions be as is.
{code}-    DFSTestUtil.toolRun(admin, "-setStoragePolicy -path /foo -policy 
WARM", 0,
-        "Set storage policy WARM on " + foo.toString());
+    DFSTestUtil.toolRun(admin, "-setStoragePolicy -path " + fs.getUri()
+        + "/foo -policy WARM", 0, "Set storage policy WARM on " + fs.getUri()
+        + "/foo");{code}


> 'storagepolicies -getStoragePolicy' command should accept URI based path.
> -------------------------------------------------------------------------
>
>                 Key: HDFS-11177
>                 URL: https://issues.apache.org/jira/browse/HDFS-11177
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: shell
>    Affects Versions: 2.7.1
>            Reporter: Surendra Singh Lilhore
>            Assignee: Surendra Singh Lilhore
>         Attachments: HDFS-11177.001.patch, HDFS-11177.002.patch
>
>
> {noformat}
> hdfs storagepolicies -getStoragePolicy -path hdfs://127.0.0.1:8020/t1
> RemoteException: Invalid path name Invalid file name: hdfs://127.0.0.1:8020/t1
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to