|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.ndfs.FSDataset
FSDataset manages a set of data blocks. Each block has a unique name and an extent on disk.
Field Summary |
Constructor Summary | |
FSDataset(File dir)
An FSDataset has a directory where it loads its data files. |
Method Summary | |
void |
finalizeBlock(Block b)
Complete the block write! |
InputStream |
getBlockData(Block b)
Get a stream of data from the indicated block. |
Block[] |
getBlockReport()
Return a table of block data |
long |
getCapacity()
Return total capacity, used and unused |
long |
getLength(Block b)
Find the block's on-disk length |
long |
getRemaining()
Return how many bytes can still be stored in the FSDataset |
void |
invalidate(Block[] invalidBlks)
We're informed that a block is no longer valid. |
boolean |
isValidBlock(Block b)
Check whether the given block is a valid one. |
boolean |
startBlock(Block b)
A Block b will be coming soon! |
OutputStream |
writeToBlock(Block b)
Start writing to a block file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FSDataset(File dir) throws IOException
Method Detail |
public long getCapacity() throws IOException
IOException
public long getRemaining() throws IOException
IOException
public long getLength(Block b) throws IOException
IOException
public InputStream getBlockData(Block b) throws IOException
IOException
public boolean startBlock(Block b) throws IOException
IOException
public OutputStream writeToBlock(Block b) throws IOException
IOException
public void finalizeBlock(Block b) throws IOException
IOException
public Block[] getBlockReport()
public boolean isValidBlock(Block b)
public void invalidate(Block[] invalidBlks) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |