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

Walter Su commented on HDFS-8433:
---------------------------------

I was thinking
{code}
  public void readFields(DataInput in) throws IOException {
    ...
    for (int i = 0; i < length; i++) {
      modes.add(WritableUtils.readEnum(in, AccessMode.class));
    }
+   idRange = WritableUtils.readVLong(in);
  }

  @Override
  public void write(DataOutput out) throws IOException {
    ...
    for (AccessMode aMode : modes) {
      WritableUtils.writeEnum(out, aMode);
    }
+   WritableUtils.writeVLong(out, idRange);
  }
{code}
A token generated by new NN can be parsed by old DN.
A token generated by old DN can be parsed by old DN.
A token generated by old DN can't be parsed by new DN.

I hope DN don't generate token then there is no problem. Actually 
{{DataNode.DataTransfer}} generates token. Now I think this idea is a bad idea. 
I miss protobuf now but nothing we can do.

> blockToken is not set in constructInternalBlock and parseStripedBlockGroup in 
> StripedBlockUtil
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8433
>                 URL: https://issues.apache.org/jira/browse/HDFS-8433
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Walter Su
>         Attachments: HDFS-8433-HDFS-7285.02.patch, HDFS-8433.00.patch, 
> HDFS-8433.01.patch
>
>
> The blockToken provided in LocatedStripedBlock is not used to create 
> LocatedBlock in constructInternalBlock and parseStripedBlockGroup in 
> StripedBlockUtil.
> We should also add ec tests with security on.



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

Reply via email to