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

Jing Zhao commented on HDFS-8289:
---------------------------------

Thanks for working on this, Yong! Your patch looks good to me. Some minors:
# We can also include this ECSchema information in the result of the 
{{getFileInfo}} call.
# After adding ECSchema into HdfsFileStatus, we now can use it to decide which 
outputstream to create in {{DFSOutputStream#newStreamForCreate}}:
{code}
      if(stat.getReplication() == 0) {
        out = new DFSStripedOutputStream(dfsClient, src, stat,
            flag, progress, checksum, favoredNodes);
      } else {
        out = new DFSOutputStream(dfsClient, src, stat,
            flag, progress, checksum, favoredNodes);
      }
{code}
# Similarly we can call {{getFileInfo}} in {{DFSClient#open}} to see which 
inputstream to create.
# Any reason to move ECSchemaProto definition from erasurecoding.proto to 
hdfs.proto?
# Let's add some unit tests about this change.

> DFSStripedOutputStream uses an additional rpc all to getErasureCodingInfo
> -------------------------------------------------------------------------
>
>                 Key: HDFS-8289
>                 URL: https://issues.apache.org/jira/browse/HDFS-8289
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Yong Zhang
>         Attachments: HDFS-8289.000.patch, HDFS-8289.001.patch
>
>
> {code}
>     // ECInfo is restored from NN just before writing striped files.
>     ecInfo = dfsClient.getErasureCodingInfo(src);
> {code}
> The rpc call above can be avoided by adding ECSchema to HdfsFileStatus.



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

Reply via email to