You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/03/15 14:35:18 UTC
[09/16] ignite git commit: WIP.
WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5cb12212
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5cb12212
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5cb12212
Branch: refs/heads/ignite-2813
Commit: 5cb122123f2703022fa414d1ee2543a06e393c63
Parents: 93d2e84
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Mar 15 15:46:41 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Mar 15 15:46:41 2016 +0300
----------------------------------------------------------------------
.../processors/igfs/IgfsMetaManager.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5cb12212/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index 9f34f68..f5e21d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -969,12 +969,12 @@ public class IgfsMetaManager extends IgfsManager {
// If parent info is null, it doesn't exist.
if (parentInfo != null) {
- IgfsListingEntry childEntry = parentInfo.listing().get(pathParts.get(i));
+ IgniteUuid childEntry = parentInfo.listing2().get(pathParts.get(i));
// If expected child exists.
if (childEntry != null) {
// If child ID matches expected ID.
- if (F.eq(childEntry.fileId(), expIds.get(i + 1)))
+ if (F.eq(childEntry, expIds.get(i + 1)))
continue;
}
}
@@ -1170,7 +1170,7 @@ public class IgfsMetaManager extends IgfsManager {
final IgfsFileInfo victimInfo = infoMap.get(victimId);
- if (!recursive && victimInfo.isDirectory() && !victimInfo.listing().isEmpty())
+ if (!recursive && victimInfo.hasChildren())
// Throw exception if not empty and not recursive.
throw new IgfsDirectoryNotEmptyException("Failed to remove directory (directory is not " +
"empty and recursive flag is not set).");
@@ -1183,7 +1183,7 @@ public class IgfsMetaManager extends IgfsManager {
final String destFileName = victimId.toString();
- assert destInfo.listing().get(destFileName) == null : "Failed to add file name into the " +
+ assert destInfo.listing2().get(destFileName) == null : "Failed to add file name into the " +
"destination directory (file already exists) [destName=" + destFileName + ']';
IgfsFileInfo srcParentInfo = infoMap.get(pathIdList.get(pathIdList.size() - 2));
@@ -1196,7 +1196,7 @@ public class IgfsMetaManager extends IgfsManager {
IgfsListingEntry srcEntry = srcParentInfo.listing().get(srcFileName);
assert srcEntry != null : "Deletion victim not found in parent listing [path=" + path +
- ", name=" + srcFileName + ", listing=" + srcParentInfo.listing() + ']';
+ ", name=" + srcFileName + ", listing=" + srcParentInfo.listing2() + ']';
assert victimId.equals(srcEntry.fileId());
@@ -1537,11 +1537,11 @@ public class IgfsMetaManager extends IgfsManager {
return null; // File not found.
if (parentInfo != null) {
- Map<String, IgfsListingEntry> listing = parentInfo.listing();
+ Map<String, IgniteUuid> listing = parentInfo.listing2();
- IgfsListingEntry entry = listing.get(fileName);
+ IgniteUuid entry = listing.get(fileName);
- if (entry == null || !entry.fileId().equals(fileId)) // File was removed or recreated.
+ if (entry == null || !entry.equals(fileId)) // File was removed or recreated.
return null;
}
@@ -2974,10 +2974,10 @@ public class IgfsMetaManager extends IgfsManager {
throw fsException(new IgfsPathNotFoundException("Failed to update times " +
"(parent was not found): " + fileName));
- IgfsListingEntry entry = parentInfo.listing().get(fileName);
+ IgniteUuid entry = parentInfo.listing2().get(fileName);
// Validate listing.
- if (entry == null || !entry.fileId().equals(fileId))
+ if (entry == null || !entry.equals(fileId))
throw fsException(new IgfsConcurrentModificationException("Failed to update times " +
"(file concurrently modified): " + fileName));