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

Mingliang Liu commented on HDFS-9677:
-------------------------------------

The v1 patch basically renames the {{generationStampV1}} => 
{{legacyGenerationStamp}} and {{generationStampV2}} => {{generationStamp}}. I 
think the renaming is reasonable as I don't see any loss of readability. 
Meanwhile, there are existing comments for the usages of the variables to 
elaborate the difference. We have other cases using "legacy" in class/variable 
names, e.g. {{BlockReaderLocalLegacy}}, {{legacyBlock}}.
Another option is to change {{generationStampV1}} to {{generationStampRandom}}, 
{{generationStampV2}} to {{generationStampSequential}}. These are real names. 
However, they're representing how it does, not exactly "what it does" 'cause 
they're implementation specific. Suppose a new user plays with generation stamp 
for the very first time, she needs to know implementation details before she is 
able to tell which one is legacy or deprecated. Even with current V1/V2 naming, 
we should not blame a new user who wonders whether a {{generationStampV3}} 
version exists.

I'd happy to refine the patch for further useful input.

> Rename generationStampV1/generationStampV2 to 
> legacyGenerationStamp/generationStamp
> -----------------------------------------------------------------------------------
>
>                 Key: HDFS-9677
>                 URL: https://issues.apache.org/jira/browse/HDFS-9677
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Jing Zhao
>            Assignee: Mingliang Liu
>         Attachments: HDFS-9677.000.patch, HDFS-9677.001.patch
>
>
> [comment|https://issues.apache.org/jira/browse/HDFS-9542?focusedCommentId=15110531&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15110531]
>  from [~drankye] in HDFS-9542:
> {quote}
> Just wonder if it's a good idea to rename: generationStampV1 => 
> legacyGenerationStamp; generationStampV2 => generationStamp, similar for 
> other variables, as we have legacy block and block.
> {quote}
> This jira plans to do this rename.



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

Reply via email to