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 fileIOException
public long getBlockSizeByte()
public long getCreationTimeMs()
public int getDiskReplication()
public InStream getInStream(ReadType readType) throws IOException
readType
- the InStream's read typeIOException
public String getLocalFilename(int blockIndex) throws IOException
blockIndex
- The index of the block in the file.IOException
public List<String> getLocationHosts() throws IOException
IOException
public int getNumberOfBlocks() throws IOException
IOException
public OutStream getOutStream(WriteType writeType) throws IOException
writeType
- the OutStream's write typeIOException
public String getPath()
public Object getUFSConf()
public boolean isComplete() throws IOException
IOException
public boolean isDirectory()
public boolean isFile()
public boolean isInLocalMemory()
public boolean isInMemory() throws IOException
IOException
public long length() throws IOException
IOException
public boolean needPin()
public TachyonByteBuffer readByteBuffer() throws IOException
IOException
public boolean recache() throws IOException
IOException
public boolean rename(String path) throws IOException
path
- the new nameIOException
public void setUFSConf(Object conf)
conf
- The configuration object accepted by ufs.Copyright © 2014. All rights reserved.