jojochuang commented on code in PR #8899:
URL: https://github.com/apache/ozone/pull/8899#discussion_r2280048782
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMDbCheckpointServletInodeBasedXfer.java:
##########
@@ -317,8 +319,30 @@ public void testContentsOfTarballWithSnapshot(boolean
includeSnapshot) throws Ex
assertFalse(inodesFromTarball.isEmpty());
assertTrue(inodesFromTarball.containsAll(inodesFromOmDataDir));
+ long actualYamlFiles = Files.list(newDbDir.toPath())
+ .filter(f -> f.getFileName().toString()
+ .endsWith(".yaml")).count();
+ assertEquals(numSnapshots, actualYamlFiles,
+ "Number of generated YAML files should match the number of
snapshots.");
+
// create hardlinks now
OmSnapshotUtils.createHardLinks(newDbDir.toPath(), true);
+
+ if (includeSnapshot) {
+ List<String> yamlRelativePaths = snapshotPaths.stream().map(path -> {
+ int startIndex = path.indexOf("db.snapshots");
+ if (startIndex != -1) {
+ return path.substring(startIndex) + ".yaml";
+ }
+ return path + ".yaml";
+ }).collect(Collectors.toList());
Review Comment:
we're at JDK8 unfortunately so not going to work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]