nizhikov commented on code in PR #10263:
URL: https://github.com/apache/ignite/pull/10263#discussion_r989905712
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java:
##########
@@ -704,6 +689,38 @@ public File snapshotLocalDir(String snpName, @Nullable
String snpPath) {
return snpPath == null ? new File(locSnpDir, snpName) : new
File(snpPath, snpName);
}
+ /**
+ * Returns path to specific incremental snapshot.
+ * For example, {@code "work/snapshots/mybackup/increments/node01/0001"}.
+ *
+ * @param snpName Snapshot name.
+ * @param snpPath Snapshot directory path.
+ * @param incIdx Increment index.
+ * @return Local snapshot directory where snapshot files are located.
+ */
+ public File incrementalSnapshotLocalDir(String snpName, @Nullable String
snpPath, int incIdx) {
+ return Paths.get(
+ incrementalSnapshotsLocalRootDir(snpName,
snpPath).getAbsolutePath(),
+ IgniteUtils.fixedLengthNumberName(incIdx, INC_DIR_LENGTH, null)
+ ).toFile();
+ }
+
+ /**
+ * Returns root folder for incremental snapshot.
+ * For example, {@code "work/snapshots/mybackup/increments/node01"}.
+ *
+ * @param snpName Snapshot name.
+ * @param snpPath Snapshot directory path.
+ * @return Local snapshot directory where snapshot files are located.
+ */
+ public File incrementalSnapshotsLocalRootDir(String snpName, @Nullable
String snpPath) {
Review Comment:
It's more convinient to have two params, from my point of view.
Is it show stopper for you? :)
--
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]