[ https://issues.apache.org/jira/browse/HDFS-8164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942017#comment-14942017 ]
Yongjun Zhang commented on HDFS-8164: ------------------------------------- Hi [~xiaochen], Thanks for the revision. Some more comments about {code} 1523 long getCTime() { 1524 return fsImage.getStorage().getCTime(); 1525 } {code} 1. As [~cnauroth] described, the time is * initialized when NN is formated * updated upon an upgrade Ideally we can have two time: FormatTime, UpgadeTime to be clear what it means. Lack of two names, I think we can continue to use getCTime, but we should have javadoc for {{ long getCTime()}} to state what this time meant. 2. {{fsimage}} can be null, and {{getSotarge()}} can return null. Suggest to check null before access. If we have one API at each layer, then only need to check one there. Thanks. > cTime is 0 in VERSION file for newly formatted NameNode. > -------------------------------------------------------- > > Key: HDFS-8164 > URL: https://issues.apache.org/jira/browse/HDFS-8164 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: 2.0.3-alpha > Reporter: Chris Nauroth > Assignee: Xiao Chen > Priority: Minor > Attachments: HDFS-8164.001.patch, HDFS-8164.002.patch, > HDFS-8164.003.patch > > > After formatting a NameNode and inspecting its VERSION file, the cTime > property shows 0. The value does get updated to current time during an > upgrade, but I believe this is intended to be the creation time of the > cluster, and therefore the initial value of 0 before an upgrade can cause > confusion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)