|
@@ -288,6 +288,16 @@ public class TestOfflineImageViewer {
|
|
hdfs.truncate(file1, 1);
|
|
hdfs.truncate(file1, 1);
|
|
writtenFiles.put(file1.toString(), hdfs.getFileStatus(file1));
|
|
writtenFiles.put(file1.toString(), hdfs.getFileStatus(file1));
|
|
|
|
|
|
|
|
+ // HDFS-14148: Create a second snapshot-enabled directory. This can cause
|
|
|
|
+ // TestOfflineImageViewer#testReverseXmlRoundTrip to fail before the patch
|
|
|
|
+ final Path snapshotDir2 = new Path("/snapshotDir2");
|
|
|
|
+ hdfs.mkdirs(snapshotDir2);
|
|
|
|
+ // Simply enable snapshot on it, no need to create one
|
|
|
|
+ hdfs.allowSnapshot(snapshotDir2);
|
|
|
|
+ dirCount++;
|
|
|
|
+ writtenFiles.put(snapshotDir2.toString(),
|
|
|
|
+ hdfs.getFileStatus(snapshotDir2));
|
|
|
|
+
|
|
// Set XAttrs so the fsimage contains XAttr ops
|
|
// Set XAttrs so the fsimage contains XAttr ops
|
|
final Path xattr = new Path("/xattr");
|
|
final Path xattr = new Path("/xattr");
|
|
hdfs.mkdirs(xattr);
|
|
hdfs.mkdirs(xattr);
|