[ https://issues.apache.org/jira/browse/HDFS-9252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lei (Eddy) Xu updated HDFS-9252: -------------------------------- Attachment: HDFS-9252.01.patch Thanks a lot for the feedbacks, [~cmccabe]. bq. It seems like blockFile.getCanonicalPath().equals(listdir[j].getCanonicalPath()) Done bq. Maybe it would be clearer if these methods were named getStoredDataLength and getStoredGenerationStamp? Done bq. n assertEquals, the thing that we "expect" to see should come first, not second. The data length and genstemp read from disk are the expected values here, and the in-memory {{ExternedBlock}}s are the actual value. It is also consistent with the above data length tests. Would appreciate much to have another review. Thanks! > Change TestFileTruncate to use FsDatasetTestUtils to get block file size and > genstamp. > -------------------------------------------------------------------------------------- > > Key: HDFS-9252 > URL: https://issues.apache.org/jira/browse/HDFS-9252 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 2.7.1 > Reporter: Lei (Eddy) Xu > Assignee: Lei (Eddy) Xu > Attachments: HDFS-9252.00.patch, HDFS-9252.01.patch > > > {{TestFileTruncate}} verifies block size and genstamp by directly accessing > the local filesystem, e.g.: > {code} > assertTrue(cluster.getBlockMetadataFile(dn0, > newBlock.getBlock()).getName().endsWith( > newBlock.getBlock().getGenerationStamp() + ".meta")); > {code} > Lets abstract the fsdataset-special logic behind FsDatasetTestUtils. -- This message was sent by Atlassian JIRA (v6.3.4#6332)