[ https://issues.apache.org/jira/browse/HDFS-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039766#comment-13039766 ]
Ivan Kelly commented on HDFS-1580: ---------------------------------- {quote}Would it be better instead to ask getHighestTxid()?{quote} #getNumberOfTransactions() is useful for deciding which journal to use. Presumably sinceTxnId refers to the last transaction Id loaded from the image. So sinceTxnId + getNumberOfTransactions() gives you the maximum prefix of the NameNode history a particular journal can give you. #getHighestTxid() would, however, give you the highest transaction id without taking into consideration that gaps may exist. > Add interface for generic Write Ahead Logging mechanisms > -------------------------------------------------------- > > Key: HDFS-1580 > URL: https://issues.apache.org/jira/browse/HDFS-1580 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Ivan Kelly > Fix For: Edit log branch (HDFS-1073) > > Attachments: EditlogInterface.1.pdf, EditlogInterface.2.pdf, > HDFS-1580+1521.diff, HDFS-1580.diff, HDFS-1580.diff, HDFS-1580.diff, > generic_wal_iface.pdf, generic_wal_iface.pdf, generic_wal_iface.pdf, > generic_wal_iface.txt > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira