[ https://issues.apache.org/jira/browse/HDFS-4339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561306#comment-13561306 ]
Jing Zhao commented on HDFS-4339: --------------------------------- The patch looks good to me. I ran the failed test locally with the new editsStored file, and the test passed. But we may need some extra unit tests to cover both FSEditLog and FSImage saving/loading with INodeId. Some other minor issues: 1. In FSImageFormat.java, {noformat} long lastInodeId = INodeId.GRANDFATHER_INODE_ID; if (LayoutVersion.supports(Feature.ADD_INODE_ID, imgVersion)) { lastInodeId = in.readLong(); namesystem.resetLastInodeId(lastInodeId); {noformat} may be simplified as {noformat} if (LayoutVersion.supports(Feature.ADD_INODE_ID, imgVersion)) { long lastInodeId = in.readLong(); namesystem.resetLastInodeId(lastInodeId); {noformat} 2. In FSImageFormat.java, {noformat} long inodeId; if (LayoutVersion.supports(Feature.ADD_INODE_ID, imgVersion)) { inodeId = in.readLong(); } else { inodeId = namesystem.allocateNewInodeId(); } {noformat} may be simplified as {noformat} long inodeId = LayoutVersion.supports(Feature.ADD_INODE_ID, imgVersion) : in.readLong() ? namesystem.allocateNewInodeId(); {noformat} > Persist inode id in fsimage and editlog > --------------------------------------- > > Key: HDFS-4339 > URL: https://issues.apache.org/jira/browse/HDFS-4339 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Affects Versions: 3.0.0 > Reporter: Brandon Li > Assignee: Brandon Li > Attachments: editsStored, HDFS-4339.patch, HDFS-4339.patch, > HDFS-4339.patch, HDFS-4339.patch > > > Persist inode id in fsimage and editlog and update offline viewers. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira