|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.nutch.fs.FSNamesystem
The FSNamesystem tracks several important tables. 1) valid fsname --> blocklist (kept on disk, logged) 2) Set of all valid blocks (inverted #1) 3) block --> machinelist (kept in memory, rebuilt dynamically from reports) 4) machine --> blocklist (inverted #2) 5) LRU cache of updated-heartbeat machines
Field Summary |
Constructor Summary | |
FSNamesystem(File dir)
dir is where the filesystem directory state is stored |
Method Summary | |
void |
blockReceived(Block block,
UTF8 name)
The given node is reporting that it received a certain block. |
void |
close()
|
int |
completeFile(UTF8 src)
Finalize the created file and make it world-accessible. |
boolean |
delete(UTF8 src)
Remove the indicated filename from the namespace. |
Object[] |
getAdditionalBlock(UTF8 src)
The client would like to obtain an additional block for the indicated filename (which is being written-to). |
Object[] |
getListing(UTF8 src)
Get a listing of all files at 'src'. |
void |
gotHeartbeat(UTF8 name,
UTF8 machineName,
int port,
long capacity,
long remaining)
The given node has reported in. |
Object[] |
open(UTF8 src)
The client wants to open the given filename. |
Object[] |
pendingTransfers(DatanodeInfo srcNode)
Return with a list of Block/DataNodeInfo sets, indicating where various Blocks should be copied, ASAP. |
void |
processReport(Block[] newReport,
UTF8 name)
The given node is reporting all its blocks. |
Block[] |
recentlyInvalidBlocks(UTF8 name)
Return with a list of Blocks that should be invalidated at the given node. |
boolean |
renameTo(UTF8 src,
UTF8 dst)
Change the indicated filename. |
Object[] |
startFile(UTF8 src)
The client would like to create a new block for the indicated filename. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FSNamesystem(File dir) throws IOException
Method Detail |
public void close()
public Object[] open(UTF8 src)
public Object[] startFile(UTF8 src)
public Object[] getAdditionalBlock(UTF8 src)
public int completeFile(UTF8 src)
public boolean renameTo(UTF8 src, UTF8 dst)
public Object[] getListing(UTF8 src)
public boolean delete(UTF8 src)
public void gotHeartbeat(UTF8 name, UTF8 machineName, int port, long capacity, long remaining)
public void processReport(Block[] newReport, UTF8 name)
public void blockReceived(Block block, UTF8 name)
public Block[] recentlyInvalidBlocks(UTF8 name)
public Object[] pendingTransfers(DatanodeInfo srcNode)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |