hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6169) Move the address in WebImageViewer
Date Mon, 31 Mar 2014 18:13:16 GMT

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

Haohui Mai commented on HDFS-6169:
----------------------------------

{code}
-    if (strPath.equals("/")) {
+    // check strPath starts with "/webhdfs/v1" and trim it
+    Preconditions.checkArgument(strPath.startsWith("/webhdfs/v1"),
+        "The specified path: " + strPath +
+        " should start with \"/webhdfs/v1\"");
+    if (strPath.equals("/webhdfs/v1") || strPath.equals("/webhdfs/v1/")) {
       return INodeId.ROOT_INODE_ID;
     }
{code}

This should be handled by the netty handler.

{code}
+      url = new URL("http://localhost:" + port + "/webhdfs/v1/?op=LISTSTATUS");
{code}

Please refactor your test so that (1) it generates the prefix of the URL once, and (2) it
uses {{DFSTestUtil.urlGet()}} to retrieve the contents.

> Move the address in WebImageViewer
> ----------------------------------
>
>                 Key: HDFS-6169
>                 URL: https://issues.apache.org/jira/browse/HDFS-6169
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: tools
>    Affects Versions: 2.5.0
>            Reporter: Akira AJISAKA
>            Assignee: Akira AJISAKA
>         Attachments: HDFS-6169.2.patch, HDFS-6169.patch
>
>
> Move the endpoint of WebImageViewer from http://hostname:port/ to http://hostname:port/webhdfs/v1/
to support {{hdfs dfs -ls}} to WebImageViewer.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message