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

Duo Zhang commented on HDFS-8471:
---------------------------------

Fine. But I'd say this abstraction is only suitable for DTP, not for general 
HTTP/2 streams. And if we want to do the abstraction at a separated issue, I 
think we'd better abstract for both server and client. So I do not think the 
code should be placed in datanode package, maybe 
org.apache.hadoop.hdfs.protocol.datatransfer.http2?

The new DTP protocol of reading block is
{noformat}
                 request headers
  Client --------------------------> DataNode
                 request proto
  Client --------------------------> DataNode
                response headers
  Client <-------------------------- DataNode
                response proto
  Client <-------------------------- DataNode
----------------------------------------------
|               packet header                 |
| Client <-------------------------- DataNode |
|               packet data                   |  multiple times
| Client <-------------------------- DataNode |
|---------------------------------------------|
{noformat}

So for DTP, I think we only need to implement the inbound channel handler logic 
because we need to decode protobuf message and modify the channel pipeline. For 
outbound, we do not need to modify the channel pipeline, and I think encode a 
protobuf message is not that hard(just use writeDelimitedTo).

Thanks. [~wheat9]

> Implement read block over HTTP/2
> --------------------------------
>
>                 Key: HDFS-8471
>                 URL: https://issues.apache.org/jira/browse/HDFS-8471
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>         Attachments: HDFS-8471.1.patch, HDFS-8471.2.patch, HDFS-8471.3.patch, 
> HDFS-8471.4.patch, HDFS-8471.5.patch, HDFS-8471.patch
>
>




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

Reply via email to