|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Private public interface DatanodeProtocol
Protocol that a DFS datanode uses to communicate with the NameNode. It's used to upload current load information and block reports. The only way a NameNode can communicate with a DataNode is by returning values from these functions.
Field Summary | |
---|---|
static int |
DISK_ERROR
|
static int |
DNA_ACCESSKEYUPDATE
|
static int |
DNA_FINALIZE
|
static int |
DNA_INVALIDATE
|
static int |
DNA_RECOVERBLOCK
|
static int |
DNA_REGISTER
|
static int |
DNA_SHUTDOWN
|
static int |
DNA_TRANSFER
|
static int |
DNA_UNKNOWN
Determines actions that data node should perform when receiving a datanode command. |
static int |
FATAL_DISK_ERROR
|
static int |
INVALID_BLOCK
|
static int |
NOTIFY
|
static long |
versionID
24: register() renamed registerDatanode() |
Method Summary | |
---|---|
void |
blockReceived(DatanodeRegistration registration,
Block[] blocks,
String[] delHints)
blockReceived() allows the DataNode to tell the NameNode about recently-received block data, with a hint for pereferred replica to be deleted when there is any excessive blocks. |
DatanodeCommand |
blockReport(DatanodeRegistration registration,
long[] blocks)
blockReport() tells the NameNode about all the locally-stored blocks. |
void |
commitBlockSynchronization(Block block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets)
Commit block synchronization in lease recovery |
void |
errorReport(DatanodeRegistration registration,
int errorCode,
String msg)
errorReport() tells the NameNode about something that has gone awry. |
UpgradeCommand |
processUpgradeCommand(UpgradeCommand comm)
This is a very general way to send a command to the name-node during distributed upgrade process. |
DatanodeRegistration |
registerDatanode(DatanodeRegistration registration)
Register Datanode. |
void |
reportBadBlocks(LocatedBlock[] blocks)
same as ClientProtocol.reportBadBlocks(LocatedBlock[])
} |
DatanodeCommand[] |
sendHeartbeat(DatanodeRegistration registration,
long capacity,
long dfsUsed,
long remaining,
int xmitsInProgress,
int xceiverCount)
sendHeartbeat() tells the NameNode that the DataNode is still alive and well. |
NamespaceInfo |
versionRequest()
|
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol |
---|
getProtocolVersion |
Field Detail |
---|
static final long versionID
static final int NOTIFY
static final int DISK_ERROR
static final int INVALID_BLOCK
static final int FATAL_DISK_ERROR
static final int DNA_UNKNOWN
static final int DNA_TRANSFER
static final int DNA_INVALIDATE
static final int DNA_SHUTDOWN
static final int DNA_REGISTER
static final int DNA_FINALIZE
static final int DNA_RECOVERBLOCK
static final int DNA_ACCESSKEYUPDATE
Method Detail |
---|
DatanodeRegistration registerDatanode(DatanodeRegistration registration) throws IOException
DatanodeRegistration
, which contains
new storageID if the datanode did not have one and
registration ID for further communication.
IOException
DataNode.dnRegistration
,
FSNamesystem.registerDatanode(DatanodeRegistration)
@Nullable DatanodeCommand[] sendHeartbeat(DatanodeRegistration registration, long capacity, long dfsUsed, long remaining, int xmitsInProgress, int xceiverCount) throws IOException
IOException
DatanodeCommand blockReport(DatanodeRegistration registration, long[] blocks) throws IOException
registration
- blocks
- - the block list as an array of longs.
Each block is represented as 2 longs.
This is done instead of Block[] to reduce memory used by block reports.
IOException
void blockReceived(DatanodeRegistration registration, Block[] blocks, String[] delHints) throws IOException
IOException
void errorReport(DatanodeRegistration registration, int errorCode, String msg) throws IOException
IOException
NamespaceInfo versionRequest() throws IOException
IOException
UpgradeCommand processUpgradeCommand(UpgradeCommand comm) throws IOException
IOException
void reportBadBlocks(LocatedBlock[] blocks) throws IOException
ClientProtocol.reportBadBlocks(LocatedBlock[])
}
IOException
void commitBlockSynchronization(Block block, long newgenerationstamp, long newlength, boolean closeFile, boolean deleteblock, DatanodeID[] newtargets) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |