@Deprecated public class TachyonFile extends Object implements Comparable<TachyonFile>
TachyonFileSystem
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TachyonFile o)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
|
long |
getBlockId(int blockIndex)
Deprecated.
Returns the id of a block in the file, specified by blockIndex.
|
long |
getBlockSizeByte()
Deprecated.
Returns the block size of this file.
|
FileBlockInfo |
getClientBlockInfo(int blockIndex)
Deprecated.
Gets a ClientBlockInfo by the file id and block index
|
long |
getCreationTimeMs()
Deprecated.
Returns the creation time of this file
|
int |
getDiskReplication()
Deprecated.
|
FileInStream |
getInStream(ReadType readType)
Deprecated.
Return the
InStream of this file based on the specified read type. |
String |
getLocalFilename(int blockIndex)
Deprecated.
Returns the local filename for the block if that file exists on the local file system.
|
List<String> |
getLocationHosts()
Deprecated.
Returns the net address of all the location hosts
|
int |
getNumberOfBlocks()
Deprecated.
Returns the number of blocks the file has.
|
FileOutStream |
getOutStream()
Deprecated.
|
FileOutStream |
getOutStream(WriteType writeType)
Deprecated.
Returns the
OutStream of this file, use the specified write type. |
String |
getPath()
Deprecated.
Returns the path of this file in the Tachyon file system.
|
Object |
getUFSConf()
Deprecated.
Gets the configuration object for UnderFileSystem.
|
int |
hashCode()
Deprecated.
|
boolean |
isCompleted()
Deprecated.
Returns whether this file is complete or not
|
boolean |
isDirectory()
Deprecated.
|
boolean |
isFile()
Deprecated.
|
boolean |
isInMemory()
Deprecated.
Return whether the file is in memory or not.
|
long |
length()
Deprecated.
|
boolean |
needPin()
Deprecated.
|
boolean |
promoteBlock(int blockIndex)
Deprecated.
Promotes block back to top layer after access.
|
TachyonByteBuffer |
readByteBuffer(int blockIndex)
Deprecated.
|
boolean |
recache()
Deprecated.
Re-caches this file into memory.
|
boolean |
rename(TachyonURI path)
Deprecated.
Renames this file.
|
void |
setUFSConf(Object conf)
Deprecated.
To set the configuration object for UnderFileSystem.
|
String |
toString()
Deprecated.
|
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
- if the underlying file does not exist or its metadata is corruptedpublic long getBlockSizeByte() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic FileBlockInfo getClientBlockInfo(int blockIndex) throws IOException
blockIndex
- The index of the block in the fileIOException
- if the underlying file does not exist or its metadata is corruptedpublic long getCreationTimeMs() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic int getDiskReplication()
public FileInStream getInStream(ReadType readType) throws IOException
InStream
of this file based on the specified read type. If it has no block,
return an EmptyBlockInStream
; if it has only one block, return a BlockInStream
of the block; otherwise return a FileInStream
.readType
- the InStream's read typeInStream
IOException
- when an event that prevents the operation from completing is encounteredpublic String getLocalFilename(int blockIndex) throws IOException
blockIndex
- The index of the block in the fileIOException
- if the underlying file does not exist or its metadata is corruptedpublic List<String> getLocationHosts() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic int getNumberOfBlocks() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic FileOutStream getOutStream(WriteType writeType) throws IOException
OutStream
of this file, use the specified write type. Always return a
FileOutStream
.writeType
- the OutStream's write type which is unusedIOException
- when an event that prevents the operation from completing is encounteredpublic FileOutStream getOutStream() throws IOException
OutStream
of this fileIOException
- when an event that prevents the operation from completing is encounteredpublic String getPath() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic Object getUFSConf()
public boolean isCompleted() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean isDirectory() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean isFile() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean isInMemory() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic long length() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean needPin() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean promoteBlock(int blockIndex) throws IOException
blockIndex
- the index of the blockIOException
- if the underlying file does not exist or its metadata is corrupted@Deprecated public TachyonByteBuffer readByteBuffer(int blockIndex) throws IOException
blockIndex
- The block index of the current file to read.IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean recache() throws IOException
IOException
- if the underlying file does not exist or its metadata is corruptedpublic boolean rename(TachyonURI path) throws IOException
path
- the new nameIOException
- if an event that prevent the operation from completing is encounteredpublic void setUFSConf(Object conf)
conf
- The configuration object accepted by ufsCopyright © 2015. All Rights Reserved.