Mmuzaf commented on a change in pull request #8767:
URL: https://github.com/apache/ignite/pull/8767#discussion_r591815051
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -1113,6 +1136,58 @@ private static String snapshotMetaFileName(String
consId) {
return U.maskForFileName(consId) + SNAPSHOT_METAFILE_EXT;
}
+ /**
+ * @param snpName Snapshot name.
+ * @param folderName The node folder name, usually it's the same as the
U.maskForFileName(consistentId).
+ * @param grpName Cache group name.
+ * @param partId Partition id.
+ * @return Iterator over partition.
+ */
+ public GridCloseableIterator<CacheDataRow> partitionRows(String snpName,
+ String folderName,
+ String grpName,
+ int partId
+ ) throws IgniteCheckedException {
+ File snpDir = snapshotLocalDir(snpName);
+
+ if (!snpDir.exists())
+ throw new IgniteCheckedException("Snapshot directory doesn't
exists: " + snpDir.getAbsolutePath());
+
+ File nodePath = new File(snpDir, databaseRelativePath(folderName));
+
+ if (!nodePath.exists())
+ throw new IgniteCheckedException("Consistent id directory doesn't
exists: " + nodePath.getAbsolutePath());
+
+ List<File> grps = cacheDirectories(nodePath, name ->
name.equals(grpName));
+
+ if (F.isEmpty(grps) || grps.size() > 1)
+ throw new IgniteCheckedException("Snapshot cache group not found
[dir=" + snpDir.getAbsolutePath() + ", grpName=" + grpName + ']');
Review comment:
Fixed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]