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

Tsz Wo Nicholas Sze commented on HDFS-7279:
-------------------------------------------

- In HdfsWriter, should the calls to releaseDfsResources() be put in 
finally-blocks?

- In the code below, why 11?  Is it due to "/webhdfs/v1".length?  Would it work 
if the URL has additional /, e.g. /webhdfs//v1/?
{code}
//ParameterParser
+    this.path = decoder.path().substring(11);
{code}

- ParameterParser and WebHdfsHandler should reuse the Param classes in 
org.apache.hadoop.hdfs.web.resources.  For example,
{code}
 // WebHdfsHandler.handle
  public void handle(ChannelHandlerContext ctx, HttpRequest req)
    throws Exception {
    String op = params.op();
    HttpMethod method = req.getMethod();
    if (method == GET) {
      final GetOpParam.Op get = new GetOpParam(op).getValue();
      if (get == GetOpParam.Op.OPEN) {
        onOpen(ctx);
      } else if (..._) {
        ...
      }
    } else if (...) {
      ...
    }
  }
{code}


> Use netty to implement DatanodeWebHdfsMethods
> ---------------------------------------------
>
>                 Key: HDFS-7279
>                 URL: https://issues.apache.org/jira/browse/HDFS-7279
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode, webhdfs
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-7279.000.patch, HDFS-7279.001.patch, 
> HDFS-7279.002.patch, HDFS-7279.003.patch, HDFS-7279.004.patch, 
> HDFS-7279.005.patch, HDFS-7279.006.patch, HDFS-7279.007.patch, 
> HDFS-7279.008.patch
>
>
> Currently the DN implements all related webhdfs functionality using jetty. As 
> the current jetty version the DN used (jetty 6) lacks of fine-grained buffer 
> and connection management, DN often suffers from long latency and OOM when 
> its webhdfs component is under sustained heavy load.
> This jira proposes to implement the webhdfs component in DN using netty, 
> which can be more efficient and allow more finer-grain controls on webhdfs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to