public class InodeFile extends Inode
Constructor and Description |
---|
InodeFile(String name,
int id,
int parentId,
long blockSizeByte,
long creationTimeMs) |
Modifier and Type | Method and Description |
---|---|
void |
addBlock(BlockInfo blockInfo) |
void |
addLocation(int blockIndex,
long workerId,
NetAddress workerAddress) |
ClientFileInfo |
generateClientFileInfo(String path) |
long |
getBlockIdBasedOnOffset(long offset) |
List<Long> |
getBlockIds() |
List<Pair<Long,Long>> |
getBlockIdWorkerIdPairs() |
List<NetAddress> |
getBlockLocations(int blockIndex) |
long |
getBlockSizeByte() |
String |
getCheckpointPath() |
ClientBlockInfo |
getClientBlockInfo(int blockIndex) |
List<ClientBlockInfo> |
getClientBlockInfos()
Get file's all blocks' ClientBlockInfo information.
|
long |
getLength() |
long |
getNewBlockId() |
int |
getNumberOfBlocks() |
boolean |
hasCheckpointed() |
boolean |
isCache() |
boolean |
isComplete() |
boolean |
isFullyInMemory() |
boolean |
isPin() |
void |
removeLocation(int blockIndex,
long workerId) |
void |
setCache(boolean cache) |
void |
setCheckpointPath(String checkpointPath) |
void |
setComplete() |
void |
setComplete(boolean complete) |
void |
setLength(long length) |
void |
setPin(boolean pin) |
String |
toString() |
compareTo, equals, getCreationTimeMs, getId, getInodeType, getName, getParentId, hashCode, isDirectory, isFile, reverseId, setName, setParentId
public InodeFile(String name, int id, int parentId, long blockSizeByte, long creationTimeMs)
public long getLength()
public void setLength(long length) throws SuspectedFileSizeException, BlockInfoException
public boolean isComplete()
public void setComplete()
public void setComplete(boolean complete)
public void setCheckpointPath(String checkpointPath)
public String getCheckpointPath()
public long getNewBlockId()
public void addBlock(BlockInfo blockInfo) throws BlockInfoException
BlockInfoException
public void addLocation(int blockIndex, long workerId, NetAddress workerAddress) throws BlockInfoException
BlockInfoException
public void removeLocation(int blockIndex, long workerId) throws BlockInfoException
BlockInfoException
public long getBlockIdBasedOnOffset(long offset)
public long getBlockSizeByte()
public List<NetAddress> getBlockLocations(int blockIndex) throws BlockInfoException
BlockInfoException
public ClientBlockInfo getClientBlockInfo(int blockIndex) throws BlockInfoException
BlockInfoException
public List<ClientBlockInfo> getClientBlockInfos()
public boolean isFullyInMemory()
public void setPin(boolean pin)
public boolean isPin()
public void setCache(boolean cache)
public boolean isCache()
public boolean hasCheckpointed()
public int getNumberOfBlocks()
public ClientFileInfo generateClientFileInfo(String path)
generateClientFileInfo
in class Inode
Copyright © 2013. All rights reserved.