public class TachyonFile extends Object implements Comparable<TachyonFile>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TachyonFile o) |
boolean |
equals(Object obj) |
long |
getBlockId(int blockIndex)
Return the block id of a block in the file, specified by blockIndex
|
long |
getBlockSizeByte()
Return the block's size of this file
|
long |
getCreationTimeMs()
Return the creation time of this file
|
int |
getDiskReplication() |
InStream |
getInStream(ReadType readType)
Return the InStream of this file, use the specified read type.
|
String |
getLocalFilename(int blockIndex)
Returns the local filename for the block if that file exists on the local file system.
|
List<String> |
getLocationHosts()
Return the net address of all the location hosts
|
int |
getNumberOfBlocks()
Return the number of blocks the file has.
|
OutStream |
getOutStream(WriteType writeType)
Return the OutStream of this file, use the specified write type.
|
String |
getPath()
Return the path of this file in the Tachyon file system
|
Object |
getUFSConf()
To get the configuration object for UnderFileSystem.
|
int |
hashCode() |
boolean |
isComplete()
Return whether this file is complete or not
|
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isInLocalMemory() |
boolean |
isInMemory()
Return whether the file is in memory or not.
|
long |
length() |
boolean |
needPin() |
TachyonByteBuffer |
readByteBuffer()
Return a TachyonByteBuffer of this file's block.
|
boolean |
recache() |
boolean |
rename(String path)
Rename this file
|
void |
setUFSConf(Object conf)
To set the configuration object for UnderFileSystem.
|
String |
toString() |
public int compareTo(TachyonFile o)
compareTo in interface Comparable<TachyonFile>public long getBlockId(int blockIndex)
throws IOException
blockIndex - the index of the block in this fileIOExceptionpublic long getBlockSizeByte()
public long getCreationTimeMs()
public int getDiskReplication()
public InStream getInStream(ReadType readType) throws IOException
readType - the InStream's read typeIOExceptionpublic String getLocalFilename(int blockIndex) throws IOException
blockIndex - The index of the block in the file.IOExceptionpublic List<String> getLocationHosts() throws IOException
IOExceptionpublic int getNumberOfBlocks()
throws IOException
IOExceptionpublic OutStream getOutStream(WriteType writeType) throws IOException
writeType - the OutStream's write typeIOExceptionpublic String getPath()
public Object getUFSConf()
public boolean isComplete()
throws IOException
IOExceptionpublic boolean isDirectory()
public boolean isFile()
public boolean isInLocalMemory()
public boolean isInMemory()
throws IOException
IOExceptionpublic long length()
throws IOException
IOExceptionpublic boolean needPin()
public TachyonByteBuffer readByteBuffer() throws IOException
IOExceptionpublic boolean recache()
throws IOException
IOExceptionpublic boolean rename(String path) throws IOException
path - the new nameIOExceptionpublic void setUFSConf(Object conf)
conf - The configuration object accepted by ufs.Copyright © 2014. All rights reserved.