You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Devaraj Das (JIRA)" <ji...@apache.org> on 2006/07/06 12:38:30 UTC

[jira] Created: (HADOOP-347) Implement HDFS content browsing interface

Implement HDFS content browsing interface
-----------------------------------------

         Key: HADOOP-347
         URL: http://issues.apache.org/jira/browse/HADOOP-347
     Project: Hadoop
        Type: New Feature

  Components: dfs  
    Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2    
    Reporter: Devaraj Das
 Assigned to: Devaraj Das 
     Fix For: 0.4.1


Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "eric baldeschwieler (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12419573 ] 

eric baldeschwieler commented on HADOOP-347:
--------------------------------------------

Sounds good.

Could you provide a little more detail on the UI on the name node?  I image a link on the front page to a page that redirects to a random data node.  That the plan?

Also you probably want to redirect the reader to a node containing the first block of the file when you get the files contents.

The block viewing seems like a good option, we should also provide the ability to simply fetch the full file.  Maybe two links on the directory browsing API could provide this option?  Machine clients would be frustrated by the block structure.

Let's be sure to support tail (-f in the future).  The is very often the desired operation.  A third link on the directory browsing page would do nicely.

I like the blocked view idea.  Perhaps all of this can simply be GET arguments appended to the end of the URL?  IE "HDFS://x.com/myPath?sz=128k&off=512k"  Negative offsets could be used for tail.

So you imagine a badge at the top of the block viewed page with <prev next> links?  Might just add some block size options there too and tail.  Keep the whole API stateless (all info in the URL).


> Implement HDFS content browsing interface
> -----------------------------------------
>
>          Key: HADOOP-347
>          URL: http://issues.apache.org/jira/browse/HADOOP-347
>      Project: Hadoop
>         Type: New Feature

>   Components: dfs
>     Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>     Reporter: Devaraj Das
>     Assignee: Devaraj Das
>      Fix For: 0.4.1

>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Yoram Arnon (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12420885 ] 

Yoram Arnon commented on HADOOP-347:
------------------------------------

a typical scenario is for a user to click on a generic link from some front page to browse the dfs, without specifying a file. The namenode will redirect to a datanode, the user browses the directory hierarchy, then views files.
it's thus impossible to direct the client to the datanode that contains the first block of "the file" - it's not known when the client first connects.

one way to go about this, is to have the datanode do redirection too when actual contents are requested. In that case we don't need to stop with the first block. Since GET requests are stateless, the client can be redirected every time he needs a new dfs block.
I suggest pushing this all out for a later version for simplicity. Have the client connect to a random node and keep him there, just load balancing clients.

> Implement HDFS content browsing interface
> -----------------------------------------
>
>          Key: HADOOP-347
>          URL: http://issues.apache.org/jira/browse/HADOOP-347
>      Project: Hadoop
>         Type: New Feature

>   Components: dfs
>     Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>     Reporter: Devaraj Das
>     Assignee: Devaraj Das
>      Fix For: 0.5.0

>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-347?page=all ]

Doug Cutting resolved HADOOP-347.
---------------------------------

    Resolution: Fixed

I just committed this.  Thanks!

> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12422085 ] 
            
Devaraj Das commented on HADOOP-347:
------------------------------------

By the way, in order to use this, hit the namenode's jetty (default port 50070). You will see the links from there.

> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "eric baldeschwieler (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12419579 ] 

eric baldeschwieler commented on HADOOP-347:
--------------------------------------------

looking forward to all this good stuff!

> Implement HDFS content browsing interface
> -----------------------------------------
>
>          Key: HADOOP-347
>          URL: http://issues.apache.org/jira/browse/HADOOP-347
>      Project: Hadoop
>         Type: New Feature

>   Components: dfs
>     Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>     Reporter: Devaraj Das
>     Assignee: Devaraj Das
>      Fix For: 0.4.1

>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-347?page=all ]

Devaraj Das updated HADOOP-347:
-------------------------------

    Attachment: fsnamesystem.patch

Fixed a problem whereby negative values of (randomly generated) array indices were not checked. This is an incremental patch over what has already been committed. Sorry for overlooking this.

> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch, fsnamesystem.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12422608 ] 
            
Devaraj Das commented on HADOOP-347:
------------------------------------

Yeah this problem is there. Thanks for pointing it out. I will create a separate issue to handle multiple datanodes in a single machine.

> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch, fsnamesystem.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12442170 ] 
            
Devaraj Das commented on HADOOP-347:
------------------------------------


   [[ Old comment, sent by email on Fri, 7 Jul 2006 00:08:28 +0530 ]]

Hi Eric,
I spoke to Marco regarding WebDAV, and he told me that he just got started
on the work, etc. So I am wondering whether I should start off on this work
without WebDAV. Things like block view, etc. may not be possible with WebDAV
without major tweaking. What are your thoughts?
Thanks
Devaraj.



> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.4.0, 0.3.2, 0.3.1, 0.3.0, 0.2.1, 0.2.0, 0.1.1, 0.1.0
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch, fsnamesystem.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by Eric Baldeschwieler <er...@yahoo-inc.com>.
sounds good.


On Jul 13, 2006, at 11:19 AM, Devaraj Das (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/HADOOP-347? 
> page=comments#action_12420906 ]
>
> Devaraj Das commented on HADOOP-347:
> ------------------------------------
>
> I am taking the approach where the user first connects to the  
> namenode's jetty and he gets redirected to a random datanode. The  
> random datanode (having an embedded DFS client) then gets the  
> directory listing (starting at the root) from the namenode (through  
> the regular IPC channel). The user then probably chooses a file to  
> view - the JSP at the backend lists the blocks of the file and he  
> also gets options to do HEAD, TAIL, DOWNLOAD_FULL_FILE, and,  
> BLOCK_VIEW (view the contents of the block in a chunked fashion  
> with a prev, next for navigation).
>
> For these options he gets redirected to one of the datanodes which  
> has the block that he ought to view. That can be handled since the  
> LocatedBlock array obtained by doing dfs.namenode.open returns an  
> array of blocks  (in the order of the bytes of the file) and the  
> block number & offset within that can be kept track of since the  
> client sends, as part of each HTTP request, the block number he  
> currently is at along with the offsets (start, end) that he wants  
> to view next. If the current datanode finishes serving up all the  
> chunks for the current block the client gets redirected to one of  
> the datanodes that has the next block with chunk offsets (0, <some- 
> preconfigured-value>). The current datanode knows where to send the  
> client to since it can also obtain the LocatedBlock array from the  
> namenode and figure that out from the array. The offset end (<some- 
> preconfigured-value>) can be customized by the user but must be a  
> factor of the DFS block size that the file was created with.
>
>> Implement HDFS content browsing interface
>> -----------------------------------------
>>
>>          Key: HADOOP-347
>>          URL: http://issues.apache.org/jira/browse/HADOOP-347
>>      Project: Hadoop
>>         Type: New Feature
>
>>   Components: dfs
>>     Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>>     Reporter: Devaraj Das
>>     Assignee: Devaraj Das
>>      Fix For: 0.5.0
>
>>
>> Implement HDFS content browsing interface over HTTP. Clients would  
>> connect to the NameNode and this would send a redirect to a random  
>> DataNode. The DataNode, via dfs client, would proxy to namenode  
>> for metadata browsing and to other datanodes for content. One can  
>> also view the local blocks on any DataNode. Head, Tail will be  
>> provided as shorthands for viewing the first block and the last  
>> block of a file.
>> For full file viewing, the data displayed per HTTP request will be  
>> a block with a PREV/NEXT link. The block size for viewing can be a  
>> configurable parameter (the user sets it via the web browser) to  
>> the HTTP server (e.g., 256 KB can be the default block size for  
>> viewing files).
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>


[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12420906 ] 

Devaraj Das commented on HADOOP-347:
------------------------------------

I am taking the approach where the user first connects to the namenode's jetty and he gets redirected to a random datanode. The random datanode (having an embedded DFS client) then gets the directory listing (starting at the root) from the namenode (through the regular IPC channel). The user then probably chooses a file to view - the JSP at the backend lists the blocks of the file and he also gets options to do HEAD, TAIL, DOWNLOAD_FULL_FILE, and, BLOCK_VIEW (view the contents of the block in a chunked fashion with a prev, next for navigation). 

For these options he gets redirected to one of the datanodes which has the block that he ought to view. That can be handled since the LocatedBlock array obtained by doing dfs.namenode.open returns an array of blocks  (in the order of the bytes of the file) and the block number & offset within that can be kept track of since the client sends, as part of each HTTP request, the block number he currently is at along with the offsets (start, end) that he wants to view next. If the current datanode finishes serving up all the chunks for the current block the client gets redirected to one of the datanodes that has the next block with chunk offsets (0, <some-preconfigured-value>). The current datanode knows where to send the client to since it can also obtain the LocatedBlock array from the namenode and figure that out from the array. The offset end (<some-preconfigured-value>) can be customized by the user but must be a factor of the DFS block size that the file was created with.

> Implement HDFS content browsing interface
> -----------------------------------------
>
>          Key: HADOOP-347
>          URL: http://issues.apache.org/jira/browse/HADOOP-347
>      Project: Hadoop
>         Type: New Feature

>   Components: dfs
>     Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>     Reporter: Devaraj Das
>     Assignee: Devaraj Das
>      Fix For: 0.5.0

>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-347?page=all ]

Devaraj Das updated HADOOP-347:
-------------------------------

    Attachment: content_browsing.patch

Implemented this as discussed.

> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Johan Oskarson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12422603 ] 
            
Johan Oskarson commented on HADOOP-347:
---------------------------------------

This patch is causing problems for me, if a computer have a second dfs data dir in the config it doesn't start properly because of:

Exception in thread "main" java.io.IOException: Problem starting http server
        at org.apache.hadoop.mapred.StatusHttpServer.start(StatusHttpServer.java:182)
        at org.apache.hadoop.dfs.DataNode.<init>(DataNode.java:170)
        at org.apache.hadoop.dfs.DataNode.makeInstanceForDir(DataNode.java:1045)
        at org.apache.hadoop.dfs.DataNode.run(DataNode.java:999)
        at org.apache.hadoop.dfs.DataNode.runAndWait(DataNode.java:1015)
        at org.apache.hadoop.dfs.DataNode.main(DataNode.java:1066)
Caused by: org.mortbay.util.MultiException[java.net.BindException: Address already in use]
        at org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
        at org.mortbay.util.Container.start(Container.java:72)
        at org.apache.hadoop.mapred.StatusHttpServer.start(StatusHttpServer.java:159)
        ... 5 more

I noticed there is code in the start method to pick a new port if the MultiException is thrown, however it doesn't seem to work.
For now I've just moved this.infoServer.start(); in DataNode.java up one line so the exception is caught and ignored, since I can't use the dfs web interface anyway (dfs nodes are all behind a gateway)

> Implement HDFS content browsing interface
> -----------------------------------------
>
>                 Key: HADOOP-347
>                 URL: http://issues.apache.org/jira/browse/HADOOP-347
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs
>    Affects Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>             Fix For: 0.5.0
>
>         Attachments: content_browsing.patch, fsnamesystem.patch
>
>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-347) Implement HDFS content browsing interface

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-347?page=comments#action_12419577 ] 

Devaraj Das commented on HADOOP-347:
------------------------------------

Thanks Eric for the inputs! 
Regarding the UI on the front page, what you say makes sense. The other option being the namenode sending a HTTP REDIRECT to the host the namenode chooses. We can take the first approach since that will not involve sending the REDIRECT (thereby saving some data communication overhead).
I agree in general with the other things like block viewing, etc. you mention. Also, I plan to support tail too (mentioned that when I created this bug).

> Implement HDFS content browsing interface
> -----------------------------------------
>
>          Key: HADOOP-347
>          URL: http://issues.apache.org/jira/browse/HADOOP-347
>      Project: Hadoop
>         Type: New Feature

>   Components: dfs
>     Versions: 0.1.0, 0.2.0, 0.1.1, 0.3.0, 0.4.0, 0.2.1, 0.3.1, 0.3.2
>     Reporter: Devaraj Das
>     Assignee: Devaraj Das
>      Fix For: 0.4.1

>
> Implement HDFS content browsing interface over HTTP. Clients would connect to the NameNode and this would send a redirect to a random DataNode. The DataNode, via dfs client, would proxy to namenode for metadata browsing and to other datanodes for content. One can also view the local blocks on any DataNode. Head, Tail will be provided as shorthands for viewing the first block and the last block of a file. 
> For full file viewing, the data displayed per HTTP request will be a block with a PREV/NEXT link. The block size for viewing can be a configurable parameter (the user sets it via the web browser) to the HTTP server (e.g., 256 KB can be the default block size for viewing files).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira