@Test public void isInMemoryTest() throws InvalidPathException, FileAlreadyExistException, IOException { int fileId = TestUtils.createByteFile(mTfs, "/file1", WriteType.MUST_CACHE, USER_QUOTA_UNIT_BYTES); TachyonFile file = mTfs.getFile(fileId); Assert.assertTrue(file.isInMemory()); fileId = TestUtils.createByteFile(mTfs, "/file2", WriteType.CACHE_THROUGH, USER_QUOTA_UNIT_BYTES); file = mTfs.getFile(fileId); Assert.assertTrue(file.isInMemory()); fileId = TestUtils.createByteFile(mTfs, "/file3", WriteType.THROUGH, USER_QUOTA_UNIT_BYTES); file = mTfs.getFile(fileId); Assert.assertFalse(file.isInMemory()); Assert.assertTrue(file.recache()); Assert.assertTrue(file.isInMemory()); fileId = TestUtils.createByteFile(mTfs, "/file4", WriteType.THROUGH, WORKER_CAPACITY_BYTES + 1); file = mTfs.getFile(fileId); Assert.assertFalse(file.isInMemory()); Assert.assertFalse(file.recache()); Assert.assertFalse(file.isInMemory()); fileId = TestUtils.createByteFile(mTfs, "/file5", WriteType.THROUGH, WORKER_CAPACITY_BYTES); file = mTfs.getFile(fileId); Assert.assertFalse(file.isInMemory()); Assert.assertTrue(file.recache()); Assert.assertTrue(file.isInMemory()); }
public boolean isInMemory() throws IOException { return TFS.isInMemory(FID); }
TachyonFile implements Comparable<TachyonFile> { public boolean isInMemory() throws IOException { return TFS.isInMemory(FID); } }
TachyonFile implements Comparable<TachyonFile> { public boolean isInMemory() throws IOException { return TFS.isInMemory(FID); } TachyonFile(TachyonFS tfs, int fid); }
TachyonFile implements Comparable<TachyonFile> { public boolean isInMemory() throws IOException { return TFS.isInMemory(FID); } TachyonFile(TachyonFS tfs, int fid); @Override int compareTo(TachyonFile o); @Override boolean equals(Object obj); long getBlockId(int blockIndex); long getBlockSizeByte(); long getCreationTimeMs(); int getDiskReplication(); InStream getInStream(ReadType readType); String getLocalFilename(int blockIndex); List<String> getLocationHosts(); int getNumberOfBlocks(); OutStream getOutStream(WriteType writeType); String getPath(); Object getUFSConf(); @Override int hashCode(); boolean isComplete(); boolean isDirectory(); boolean isFile(); boolean isInLocalMemory(); boolean isInMemory(); long length(); boolean needPin(); TachyonByteBuffer readByteBuffer(); boolean recache(); boolean rename(String path); void setUFSConf(Object conf); @Override String toString(); }
TachyonFile implements Comparable<TachyonFile> { public boolean isInMemory() throws IOException { return TFS.isInMemory(FID); } TachyonFile(TachyonFS tfs, int fid); @Override int compareTo(TachyonFile o); @Override boolean equals(Object obj); long getBlockId(int blockIndex); long getBlockSizeByte(); long getCreationTimeMs(); int getDiskReplication(); InStream getInStream(ReadType readType); String getLocalFilename(int blockIndex); List<String> getLocationHosts(); int getNumberOfBlocks(); OutStream getOutStream(WriteType writeType); String getPath(); Object getUFSConf(); @Override int hashCode(); boolean isComplete(); boolean isDirectory(); boolean isFile(); boolean isInLocalMemory(); boolean isInMemory(); long length(); boolean needPin(); TachyonByteBuffer readByteBuffer(); boolean recache(); boolean rename(String path); void setUFSConf(Object conf); @Override String toString();  }