java.io.Closeable, java.lang.AutoCloseable, NamenodeProtocol, org.apache.hadoop.ipc.ProtocolMetaInterface, org.apache.hadoop.ipc.ProtocolTranslator@Private @Stable public class NamenodeProtocolTranslatorPB extends java.lang.Object implements NamenodeProtocol, org.apache.hadoop.ipc.ProtocolMetaInterface, java.io.Closeable, org.apache.hadoop.ipc.ProtocolTranslator
NamenodeProtocol interfaces to the RPC server implementing
NamenodeProtocolPB.ACT_CHECKPOINT, ACT_SHUTDOWN, ACT_UNKNOWN, FATAL, NOTIFY, versionID| Constructor | Description |
|---|---|
NamenodeProtocolTranslatorPB(NamenodeProtocolPB rpcProxy) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
endCheckpoint(NamenodeRegistration registration,
CheckpointSignature sig) |
A request to the active name-node to finalize
previously started checkpoint.
|
void |
errorReport(NamenodeRegistration registration,
int errorCode,
java.lang.String msg) |
Report to the active name-node an error occurred on a subordinate node.
|
ExportedBlockKeys |
getBlockKeys() |
Get the current block keys
|
BlocksWithLocations |
getBlocks(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanode,
long size,
long minBlockSize,
long timeInterval,
org.apache.hadoop.fs.StorageType storageType) |
Get a list of blocks belonging to
datanode
whose total size equals size. |
RemoteEditLogManifest |
getEditLogManifest(long sinceTxId) |
Return a structure containing details about all edit logs
available to be fetched from the NameNode.
|
long |
getMostRecentCheckpointTxId() |
Get the transaction ID of the most recent checkpoint.
|
java.lang.Long |
getNextSPSPath() |
|
long |
getTransactionID() |
|
java.lang.Object |
getUnderlyingProxyObject() |
|
boolean |
isMethodSupported(java.lang.String methodName) |
|
boolean |
isRollingUpgrade() |
return whether the Namenode is rolling upgrade in progress (true) or
not (false).
|
boolean |
isUpgradeFinalized() |
|
NamenodeRegistration |
registerSubordinateNamenode(NamenodeRegistration registration) |
Register a subordinate name-node like backup node.
|
CheckpointSignature |
rollEditLog() |
Closes the current edit log and opens a new one.
|
NamenodeCommand |
startCheckpoint(NamenodeRegistration registration) |
A request to the active name-node to start a checkpoint.
|
NamespaceInfo |
versionRequest() |
Request name-node version and storage information.
|
public NamenodeProtocolTranslatorPB(NamenodeProtocolPB rpcProxy)
public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablepublic java.lang.Object getUnderlyingProxyObject()
getUnderlyingProxyObject in interface org.apache.hadoop.ipc.ProtocolTranslatorpublic BlocksWithLocations getBlocks(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanode, long size, long minBlockSize, long timeInterval, org.apache.hadoop.fs.StorageType storageType) throws java.io.IOException
NamenodeProtocoldatanode
whose total size equals size.getBlocks in interface NamenodeProtocoldatanode - a data nodesize - requested sizeminBlockSize - each block should be of this minimum Block SizetimeInterval - prefer to get blocks which are belong to
the cold files accessed before the time intervalstorageType - the given storage type StorageTypejava.io.IOException - if size is less than or equal to 0 or
datanode does not existBalancerpublic ExportedBlockKeys getBlockKeys() throws java.io.IOException
NamenodeProtocolgetBlockKeys in interface NamenodeProtocoljava.io.IOExceptionpublic long getTransactionID()
throws java.io.IOException
getTransactionID in interface NamenodeProtocoljava.io.IOExceptionpublic long getMostRecentCheckpointTxId()
throws java.io.IOException
NamenodeProtocolgetMostRecentCheckpointTxId in interface NamenodeProtocoljava.io.IOExceptionpublic CheckpointSignature rollEditLog() throws java.io.IOException
NamenodeProtocolrollEditLog in interface NamenodeProtocoljava.io.IOExceptionpublic NamespaceInfo versionRequest() throws java.io.IOException
NamenodeProtocolversionRequest in interface NamenodeProtocolNamespaceInfo identifying versions and storage information
of the name-nodejava.io.IOExceptionpublic void errorReport(NamenodeRegistration registration, int errorCode, java.lang.String msg) throws java.io.IOException
NamenodeProtocolerrorReport in interface NamenodeProtocolregistration - requesting node.errorCode - indicates the errormsg - free text description of the errorjava.io.IOExceptionpublic NamenodeRegistration registerSubordinateNamenode(NamenodeRegistration registration) throws java.io.IOException
NamenodeProtocolregisterSubordinateNamenode in interface NamenodeProtocolNamenodeRegistration of the node,
which this node has just registered with.java.io.IOExceptionpublic NamenodeCommand startCheckpoint(NamenodeRegistration registration) throws java.io.IOException
NamenodeProtocolstartCheckpoint in interface NamenodeProtocolregistration - the requesting nodeCheckpointCommand if checkpoint is allowed.java.io.IOExceptionCheckpointCommand,
NamenodeCommand,
NamenodeProtocol.ACT_SHUTDOWNpublic void endCheckpoint(NamenodeRegistration registration, CheckpointSignature sig) throws java.io.IOException
NamenodeProtocolendCheckpoint in interface NamenodeProtocolregistration - the requesting nodesig - CheckpointSignature which identifies the checkpoint.java.io.IOExceptionpublic RemoteEditLogManifest getEditLogManifest(long sinceTxId) throws java.io.IOException
NamenodeProtocolgetEditLogManifest in interface NamenodeProtocolsinceTxId - return only logs that contain transactions >=
sinceTxIdjava.io.IOExceptionpublic boolean isMethodSupported(java.lang.String methodName)
throws java.io.IOException
isMethodSupported in interface org.apache.hadoop.ipc.ProtocolMetaInterfacejava.io.IOExceptionpublic boolean isUpgradeFinalized()
throws java.io.IOException
isUpgradeFinalized in interface NamenodeProtocoljava.io.IOExceptionpublic boolean isRollingUpgrade()
throws java.io.IOException
NamenodeProtocolisRollingUpgrade in interface NamenodeProtocoljava.io.IOExceptionpublic java.lang.Long getNextSPSPath()
throws java.io.IOException
getNextSPSPath in interface NamenodeProtocoljava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.