NamenodeProtocolsDatanodeProtocolClientSideTranslatorPB, NameNodeRpcServer@Private
public interface DatanodeProtocol
| Modifier and Type | Field | Description |
|---|---|---|
static int |
DISK_ERROR |
|
static int |
DNA_ACCESSKEYUPDATE |
|
static int |
DNA_BALANCERBANDWIDTHUPDATE |
|
static int |
DNA_BLOCK_STORAGE_MOVEMENT |
|
static int |
DNA_CACHE |
|
static int |
DNA_DROP_SPS_WORK_COMMAND |
|
static int |
DNA_ERASURE_CODING_RECONSTRUCTION |
|
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_UNCACHE |
|
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 | Description |
|---|---|---|
void |
blockReceivedAndDeleted(DatanodeRegistration registration,
java.lang.String poolId,
StorageReceivedDeletedBlocks[] rcvdAndDeletedBlocks) |
blockReceivedAndDeleted() allows the DataNode to tell the NameNode about
recently-received and -deleted block data.
|
DatanodeCommand |
blockReport(DatanodeRegistration registration,
java.lang.String poolId,
StorageBlockReport[] reports,
BlockReportContext context) |
blockReport() tells the NameNode about all the locally-stored blocks.
|
DatanodeCommand |
cacheReport(DatanodeRegistration registration,
java.lang.String poolId,
java.util.List<java.lang.Long> blockIds) |
Communicates the complete list of locally cached blocks to the NameNode.
|
void |
commitBlockSynchronization(org.apache.hadoop.hdfs.protocol.ExtendedBlock block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
org.apache.hadoop.hdfs.protocol.DatanodeID[] newtargets,
java.lang.String[] newtargetstorages) |
Commit block synchronization in lease recovery
|
void |
errorReport(DatanodeRegistration registration,
int errorCode,
java.lang.String msg) |
errorReport() tells the NameNode about something that has gone
awry.
|
DatanodeRegistration |
registerDatanode(DatanodeRegistration registration) |
Register Datanode.
|
void |
reportBadBlocks(org.apache.hadoop.hdfs.protocol.LocatedBlock[] blocks) |
same as
ClientProtocol.reportBadBlocks(LocatedBlock[])
} |
HeartbeatResponse |
sendHeartbeat(DatanodeRegistration registration,
org.apache.hadoop.hdfs.server.protocol.StorageReport[] reports,
long dnCacheCapacity,
long dnCacheUsed,
int xmitsInProgress,
int xceiverCount,
int failedVolumes,
VolumeFailureSummary volumeFailureSummary,
boolean requestFullBlockReportLease,
org.apache.hadoop.hdfs.server.protocol.SlowPeerReports slowPeers,
org.apache.hadoop.hdfs.server.protocol.SlowDiskReports slowDisks) |
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
static final int DNA_CACHE
static final int DNA_UNCACHE
static final int DNA_ERASURE_CODING_RECONSTRUCTION
static final int DNA_BLOCK_STORAGE_MOVEMENT
static final int DNA_DROP_SPS_WORK_COMMAND
DatanodeRegistration registerDatanode(DatanodeRegistration registration) throws java.io.IOException
registration - datanode registration informationDatanodeRegistration with
updated registration informationjava.io.IOExceptionFSNamesystem.registerDatanode(DatanodeRegistration)HeartbeatResponse sendHeartbeat(DatanodeRegistration registration, org.apache.hadoop.hdfs.server.protocol.StorageReport[] reports, long dnCacheCapacity, long dnCacheUsed, int xmitsInProgress, int xceiverCount, int failedVolumes, VolumeFailureSummary volumeFailureSummary, boolean requestFullBlockReportLease, @Nonnull org.apache.hadoop.hdfs.server.protocol.SlowPeerReports slowPeers, @Nonnull org.apache.hadoop.hdfs.server.protocol.SlowDiskReports slowDisks) throws java.io.IOException
registration - datanode registration information.reports - utilization report per storage.dnCacheCapacity - the total cache capacity of the datanode (in bytes).dnCacheUsed - the amount of cache used by the datanode (in bytes).xmitsInProgress - number of transfers from this datanode to others.xceiverCount - number of active transceiver threads.failedVolumes - number of failed volumes.volumeFailureSummary - info about volume failures.requestFullBlockReportLease - whether to request a full block
report lease.slowPeers - Details of peer DataNodes that were detected as being
slow to respond to packet writes. Empty report if no
slow peers were detected by the DataNode.slowDisks - Details of disks on DataNodes that were detected as
being slow. Empty report if no slow disks were detected.java.io.IOException - on error.DatanodeCommand blockReport(DatanodeRegistration registration, java.lang.String poolId, StorageBlockReport[] reports, BlockReportContext context) throws java.io.IOException
registration - datanode registrationpoolId - 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.reports - report of blocks per storagecontext - Context information for this block report.java.io.IOExceptionDatanodeCommand cacheReport(DatanodeRegistration registration, java.lang.String poolId, java.util.List<java.lang.Long> blockIds) throws java.io.IOException
blockReport(DatanodeRegistration, String, StorageBlockReport[], BlockReportContext),
which is used to communicated blocks stored on disk.registration - The datanode registration.poolId - The block pool ID for the blocks.blockIds - A list of block IDs.java.io.IOExceptionvoid blockReceivedAndDeleted(DatanodeRegistration registration, java.lang.String poolId, StorageReceivedDeletedBlocks[] rcvdAndDeletedBlocks) throws java.io.IOException
java.io.IOExceptionvoid errorReport(DatanodeRegistration registration, int errorCode, java.lang.String msg) throws java.io.IOException
java.io.IOExceptionNamespaceInfo versionRequest() throws java.io.IOException
java.io.IOExceptionvoid reportBadBlocks(org.apache.hadoop.hdfs.protocol.LocatedBlock[] blocks)
throws java.io.IOException
ClientProtocol.reportBadBlocks(LocatedBlock[])
}java.io.IOExceptionvoid commitBlockSynchronization(org.apache.hadoop.hdfs.protocol.ExtendedBlock block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
org.apache.hadoop.hdfs.protocol.DatanodeID[] newtargets,
java.lang.String[] newtargetstorages)
throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.