GeorgeJahad commented on code in PR #3980:
URL: https://github.com/apache/ozone/pull/3980#discussion_r1140801712


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -279,6 +307,92 @@ private void verifySnapshotInfoForSnapDiff(final 
SnapshotInfo fromSnapshot,
     }
   }
 
+  /**
+   * Create file of links to add to tarball.
+   * Format of entries are either:
+   * dir1/fileTo fileFrom
+   *    for files in active db or:
+   * dir1/fileTo dir2/fileFrom
+   *    for files in another directory, (either another snapshot dir or
+   *    sst compaction backup directory)
+   * @param truncateLength - Length of initial path to trim in file path.
+   * @param hardLinkFiles - Map of link->file paths.
+   * @return Path to the file of links created.
+   */
+  @SuppressFBWarnings({"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"})
+  static Path createHardLinkList(int truncateLength,
+                                  Map<Path, Path> hardLinkFiles)
+      throws IOException {
+    Path data = Files.createTempFile("data", "txt");

Review Comment:
   My understand is that is does add a random number.  This shows it: 
https://mkyong.com/java/how-to-create-temporary-file-in-java/



-- 
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]

Reply via email to