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 Thu, 03 Apr 2014 17:37:17 GMT

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

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

{code}
       if (op.equals("LISTSTATUS")) {
         try {
-          json = loader.listStatus(decoder.getPath());
+          String path = decoder.getPath();
+          Preconditions.checkArgument(path.startsWith("/webhdfs/v1"),
+              "Path: " + path + " should start with \"/webhdfs/v1\".");
+          path = path.replaceFirst("/webhdfs/v1", "");
+          json = loader.listStatus(path);
{code}

If you're planning to add {{FILESTATUS}} in later patches, it looks to me that it is better
to move this out of the if branch.

It will be great if you can please address the second comment in the next patch. Thanks.

> 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.3.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