/** {@inheritDoc} */ @Override public IgfsEntryInfo process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException { IgfsEntryInfo info = IgfsUtils.createFile( entry.getKey(), blockSize, len, affKey, lockId, evictExclude, props, accessTime, modificationTime ); entry.setValue(info); return info; }
s.getModificationTime() ) : IgfsUtils.createFile( IgniteUuid.randomUuid(), (int)s.getBlockSize(),
status.modificationTime() ) : IgfsUtils.createFile( IgniteUuid.randomUuid(), igfsCtx.configuration().getBlockSize(),
"the secondary file system because the path points to a directory: " + path); IgfsEntryInfo newInfo = IgfsUtils.createFile( IgniteUuid.randomUuid(), igfsCtx.configuration().getBlockSize(),
IgfsEntryInfo info = IgfsUtils.createFile(IgniteUuid.randomUuid(), blockSize, 1024 * 1024, null, null, false, null, t, t);
/** @throws Exception If failed. */ @Test public void testAffinity2() throws Exception { int blockSize = BLOCK_SIZE; long t = System.currentTimeMillis(); IgfsEntryInfo info = IgfsUtils.createFile(IgniteUuid.randomUuid(), blockSize, 1024 * 1024, null, null, false, null, t, t); Collection<IgfsBlockLocation> affinity = mgr.affinity(info, 0, info.length()); for (IgfsBlockLocation loc : affinity) { info("Going to check IGFS block location: " + loc); int block = (int)(loc.start() / blockSize); int endPos; do { IgfsBlockKey key = new IgfsBlockKey(info.id(), null, false, block); ClusterNode affNode = grid(0).affinity(grid(0).igfsx("igfs").configuration() .getDataCacheConfiguration().getName()).mapKeyToNode(key); assertTrue("Failed to find node in affinity [dataMgr=" + loc.nodeIds() + ", nodeId=" + affNode.id() + ", block=" + block + ']', loc.nodeIds().contains(affNode.id())); endPos = (block + 1) * blockSize; block++; } while (endPos < loc.start() + loc.length()); } }
IgfsEntryInfo info = IgfsUtils.createFile(IgniteUuid.randomUuid(), blockSize, 0L, null, IgfsUtils.DELETE_LOCK_ID, false, null, t, t);
IgfsEntryInfo info = IgfsUtils.createFile(IgniteUuid.randomUuid(), blockSize, 0L, null, IgfsUtils.DELETE_LOCK_ID, false, null, t, t);
IgfsEntryInfo info = IgfsUtils.createFile(IgniteUuid.randomUuid(), 200, 0L, null, IgfsUtils.DELETE_LOCK_ID, false, null, t, t);
/** @throws Exception If failed. */ @Test public void testAffinityFileMap() throws Exception { int blockSize = BLOCK_SIZE; long t = System.currentTimeMillis(); IgfsEntryInfo info = IgfsUtils.createFile(IgniteUuid.randomUuid(), blockSize, 1024 * 1024, null, null, false, null, t, t); IgniteUuid affKey = IgniteUuid.randomUuid(); IgfsFileMap map = new IgfsFileMap(); map.addRange(new IgfsFileAffinityRange(3 * BLOCK_SIZE, 5 * BLOCK_SIZE - 1, affKey)); map.addRange(new IgfsFileAffinityRange(13 * BLOCK_SIZE, 17 * BLOCK_SIZE - 1, affKey)); info = info.fileMap(map); Collection<IgfsBlockLocation> affinity = mgr.affinity(info, 0, info.length()); checkAffinity(blockSize, info, affinity); // Check from middle of range. affinity = mgr.affinity(info, 3 * BLOCK_SIZE + BLOCK_SIZE / 2, info.length()); checkAffinity(blockSize, info, affinity); // Check from middle of last range. affinity = mgr.affinity(info, 14 * BLOCK_SIZE, info.length()); checkAffinity(blockSize, info, affinity); // Check inside one range. affinity = mgr.affinity(info, 14 * BLOCK_SIZE, 2 * BLOCK_SIZE); checkAffinity(blockSize, info, affinity); // Check outside last range. affinity = mgr.affinity(info, 18 * BLOCK_SIZE, info.length()); checkAffinity(blockSize, info, affinity); }
/** {@inheritDoc} */ @Override public IgfsEntryInfo process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException { IgfsEntryInfo info = IgfsUtils.createFile( entry.getKey(), blockSize, len, affKey, lockId, evictExclude, props, accessTime, modificationTime ); entry.setValue(info); return info; }
status.modificationTime() ) : IgfsUtils.createFile( IgniteUuid.randomUuid(), igfsCtx.configuration().getBlockSize(),
"the secondary file system because the path points to a directory: " + path); IgfsEntryInfo newInfo = IgfsUtils.createFile( IgniteUuid.randomUuid(), igfsCtx.configuration().getBlockSize(),