[
https://issues.apache.org/jira/browse/HDFS-13087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401516#comment-16401516
]
Xiao Chen edited comment on HDFS-13087 at 3/16/18 7:02 AM:
-----------------------------------------------------------
Thanks [~GeLiXin] for revving.
The explanation about the new method and null check makes sense. Sorry I didn't
look carefully in the previous review.
I didn't notice CipherSuite and CryptoProtocolVersion classes are enum. Looking
at the variable field {{unknownValue}}, I think we should go with the default
Enum#equals comparison. The unknown value was added by HDFS-6605 and the
comparison should only care about the actual enum values.
Some other comments:
- We can use {{HashCodeBuilder}} and {{EqualsBuilder}} to implement the EZI
equals method.
- EZI#getEncryptionZoneForPath: Since snapshot is a special case, can we still
use the existing logic to get from {{encryptionZones}} if
{{iip.getPathSnapshotId() == Snapshot.CURRENT_STATE_ID}}?
- In the new method, parameter name typo 'sanpshotId'.
was (Author: xiaochen):
Thanks [~GeLiXin] for revving.
I didn't notice CipherSuite and CryptoProtocolVersion classes are enum. Looking
at the variable field \{{unknownValue}}, I think we should go with the default
Enum#equals comparison. The unknown value was added by HDFS-6605 and the
comparison should only care about the actual enum values.
Some other comments:
- We can use \{{HashCodeBuilder}} and \{{EqualsBuilder}} to implement the EZI
equals method.
- EZI#getEncryptionZoneForPath: Since snapshot is a special case, can we still
use the existing logic to get from {{encryptionZones}} if
{{iip.getPathSnapshotId() == Snapshot.CURRENT_STATE_ID}}?
- In the new method, parameter name typo 'sanpshotId'.
> Fix: Snapshots On encryption zones get incorrect EZ settings when encryption
> zone changes
> -----------------------------------------------------------------------------------------
>
> Key: HDFS-13087
> URL: https://issues.apache.org/jira/browse/HDFS-13087
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: encryption
> Affects Versions: 3.1.0
> Reporter: LiXin Ge
> Assignee: LiXin Ge
> Priority: Major
> Attachments: HDFS-13087.001.patch, HDFS-13087.002.patch,
> HDFS-13087.003.patch
>
>
> Snapshots are supposed to be immutable and read only, so the EZ settings
> which in a snapshot path shouldn't change when the origin encryption zone
> changes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]