/** * @return the epoch time the entity referenced by this uri was last modified, mutable */ public long getLastModificationTimeMs() { return mInfo.getLastModificationTimeMs(); }
@Test public void createFileUsesOperationTime() throws Exception { AlluxioURI path = new AlluxioURI("/test"); mFileSystemMaster.createFile(path, CreateFileContext.defaults().setOperationTimeMs(100)); assertEquals(100, mFileSystemMaster.getFileInfo(path, GetStatusContext.defaults()) .getLastModificationTimeMs()); }
private void assertFileInfoEqualsFileStatus(FileInfo info, FileStatus status) { assertEquals(info.getOwner(), status.getOwner()); assertEquals(info.getGroup(), status.getGroup()); assertEquals(info.getMode(), status.getPermission().toShort()); assertEquals(info.getLastModificationTimeMs(), status.getModificationTime()); assertEquals(info.isFolder(), status.isDir()); } }
.setCacheable(fileInfo.isCacheable()).setPersisted(fileInfo.isPersisted()) .addAllBlockIds(fileInfo.getBlockIds()) .setLastModificationTimeMs(fileInfo.getLastModificationTimeMs()).setTtl(fileInfo.getTtl()) .setOwner(fileInfo.getOwner()).setGroup(fileInfo.getGroup()).setMode(fileInfo.getMode()) .setPersistenceState(fileInfo.getPersistenceState()).setMountPoint(fileInfo.isMountPoint())
/** * Tests the {@link MutableInodeDirectory#generateClientFileInfo(String)} method. */ @Test public void generateClientFileInfo() { MutableInodeDirectory inodeDirectory = createInodeDirectory(); String path = "/test/path"; FileInfo info = inodeDirectory.generateClientFileInfo(path); Assert.assertEquals(inodeDirectory.getId(), info.getFileId()); Assert.assertEquals(inodeDirectory.getName(), info.getName()); Assert.assertEquals(path, info.getPath()); Assert.assertEquals("", info.getUfsPath()); Assert.assertEquals(0, info.getLength()); Assert.assertEquals(0, info.getBlockSizeBytes()); Assert.assertEquals(inodeDirectory.getCreationTimeMs(), info.getCreationTimeMs()); Assert.assertTrue(info.isCompleted()); Assert.assertTrue(info.isFolder()); Assert.assertEquals(inodeDirectory.isPinned(), info.isPinned()); Assert.assertFalse(info.isCacheable()); Assert.assertNotNull(info.getBlockIds()); Assert.assertEquals(inodeDirectory.getLastModificationTimeMs(), info.getLastModificationTimeMs()); } }
/** * @return the epoch time the entity referenced by this uri was last modified, mutable */ public long getLastModificationTimeMs() { return mInfo.getLastModificationTimeMs(); }
/** * @return the epoch time the entity referenced by this uri was last modified, mutable */ public long getLastModificationTimeMs() { return mInfo.getLastModificationTimeMs(); }
Assert.assertEquals(a.getFileId(), b.getFileId()); Assert.assertEquals(a.getGroup(), b.getGroup()); Assert.assertEquals(a.getLastModificationTimeMs(), b.getLastModificationTimeMs()); Assert.assertEquals(a.getLength(), b.getLength()); Assert.assertEquals(a.getMode(), b.getMode());
fileInfo.getInMemoryPercentage()); Assert.assertEquals(uriStatus.getLastModificationTimeMs(), fileInfo.getLastModificationTimeMs()); Assert.assertEquals(uriStatus.getLength(), fileInfo.getLength()); Assert.assertEquals(uriStatus.getName(), fileInfo.getName());