@InterfaceAudience.Private public interface DatanodeProtocol
Modifier and Type | Field and Description |
---|---|
static int |
DISK_ERROR |
static int |
DNA_ACCESSKEYUPDATE |
static int |
DNA_BALANCERBANDWIDTHUPDATE |
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
This class is used by both the Namenode (client) and BackupNode (server)
to insulate from the protocol serialization.
|
Modifier and Type | Method and Description |
---|---|
void |
blockReceivedAndDeleted(DatanodeRegistration registration,
String poolId,
StorageReceivedDeletedBlocks[] rcvdAndDeletedBlocks)
blockReceivedAndDeleted() allows the DataNode to tell the NameNode about
recently-received and -deleted block data.
|
DatanodeCommand |
blockReport(DatanodeRegistration registration,
String poolId,
StorageBlockReport[] reports)
blockReport() tells the NameNode about all the locally-stored blocks.
|
void |
commitBlockSynchronization(ExtendedBlock block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets,
String[] newtargetstorages)
Commit block synchronization in lease recovery
|
void |
errorReport(DatanodeRegistration registration,
int errorCode,
String msg)
errorReport() tells the NameNode about something that has gone
awry.
|
DatanodeRegistration |
registerDatanode(DatanodeRegistration registration)
Register Datanode.
|
void |
reportBadBlocks(LocatedBlock[] blocks)
|
HeartbeatResponse |
sendHeartbeat(DatanodeRegistration registration,
StorageReport[] reports,
int xmitsInProgress,
int xceiverCount,
int failedVolumes)
sendHeartbeat() tells the NameNode that the DataNode is still
alive and well.
|
NamespaceInfo |
versionRequest() |
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
static final int DNA_BALANCERBANDWIDTHUPDATE
DatanodeRegistration registerDatanode(DatanodeRegistration registration) throws IOException
registration
- datanode registration informationDatanodeRegistration
with
updated registration informationIOException
FSNamesystem.registerDatanode(DatanodeRegistration)
HeartbeatResponse sendHeartbeat(DatanodeRegistration registration, StorageReport[] reports, int xmitsInProgress, int xceiverCount, int failedVolumes) throws IOException
registration
- datanode registration informationreports
- utilization report per storagexmitsInProgress
- number of transfers from this datanode to othersxceiverCount
- number of active transceiver threadsfailedVolumes
- number of failed volumesIOException
- on errorDatanodeCommand blockReport(DatanodeRegistration registration, String poolId, StorageBlockReport[] reports) throws IOException
registration
- poolId
- - the block pool ID for the blocksreports
- - report of blocks per storage
Each finalized block is represented as 3 longs. Each under-
construction replica is represented as 4 longs.
This is done instead of Block[] to reduce memory used by block reports.IOException
void blockReceivedAndDeleted(DatanodeRegistration registration, String poolId, StorageReceivedDeletedBlocks[] rcvdAndDeletedBlocks) throws IOException
IOException
void errorReport(DatanodeRegistration registration, int errorCode, String msg) throws IOException
IOException
NamespaceInfo versionRequest() throws IOException
IOException
void reportBadBlocks(LocatedBlock[] blocks) throws IOException
IOException
void commitBlockSynchronization(ExtendedBlock block, long newgenerationstamp, long newlength, boolean closeFile, boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages) throws IOException
IOException
Copyright © 2013 Apache Software Foundation. All rights reserved.