@InterfaceAudience.Private @InterfaceStability.Stable public class NamenodeProtocolTranslatorPB extends Object implements NamenodeProtocol, ProtocolMetaInterface, Closeable
NamenodeProtocol interfaces to the RPC server implementing
NamenodeProtocolPB.ACT_CHECKPOINT, ACT_SHUTDOWN, ACT_UNKNOWN, FATAL, NOTIFY, versionID| Constructor and Description |
|---|
NamenodeProtocolTranslatorPB(NamenodeProtocolPB rpcProxy) |
| Modifier and Type | Method and 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,
String msg)
Report to the active name-node an error occurred on a subordinate node.
|
ExportedBlockKeys |
getBlockKeys()
Get the current block keys
|
BlocksWithLocations |
getBlocks(DatanodeInfo datanode,
long size)
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.
|
long |
getTransactionID() |
boolean |
isMethodSupported(String methodName)
Checks whether the given method name is supported by the server.
|
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 Closeableclose in interface AutoCloseablepublic BlocksWithLocations getBlocks(DatanodeInfo datanode, long size) throws IOException
NamenodeProtocoldatanode
whose total size equals size.getBlocks in interface NamenodeProtocoldatanode - a data nodesize - requested sizeIOException - if size is less than or equal to 0 or
datanode does not existBalancerpublic ExportedBlockKeys getBlockKeys() throws IOException
NamenodeProtocolgetBlockKeys in interface NamenodeProtocolIOExceptionpublic long getTransactionID()
throws IOException
getTransactionID in interface NamenodeProtocolIOExceptionpublic long getMostRecentCheckpointTxId()
throws IOException
NamenodeProtocolgetMostRecentCheckpointTxId in interface NamenodeProtocolIOExceptionpublic CheckpointSignature rollEditLog() throws IOException
NamenodeProtocolrollEditLog in interface NamenodeProtocolIOExceptionpublic NamespaceInfo versionRequest() throws IOException
NamenodeProtocolversionRequest in interface NamenodeProtocolNamespaceInfo identifying versions and storage information
of the name-nodeIOExceptionpublic void errorReport(NamenodeRegistration registration, int errorCode, String msg) throws IOException
NamenodeProtocolerrorReport in interface NamenodeProtocolregistration - requesting node.errorCode - indicates the errormsg - free text description of the errorIOExceptionpublic NamenodeRegistration registerSubordinateNamenode(NamenodeRegistration registration) throws IOException
NamenodeProtocolregisterSubordinateNamenode in interface NamenodeProtocolNamenodeRegistration of the node,
which this node has just registered with.IOExceptionpublic NamenodeCommand startCheckpoint(NamenodeRegistration registration) throws IOException
NamenodeProtocolstartCheckpoint in interface NamenodeProtocolregistration - the requesting nodeCheckpointCommand if checkpoint is allowed.IOExceptionCheckpointCommand,
NamenodeCommand,
NamenodeProtocol.ACT_SHUTDOWNpublic void endCheckpoint(NamenodeRegistration registration, CheckpointSignature sig) throws IOException
NamenodeProtocolendCheckpoint in interface NamenodeProtocolregistration - the requesting nodesig - CheckpointSignature which identifies the checkpoint.IOExceptionpublic RemoteEditLogManifest getEditLogManifest(long sinceTxId) throws IOException
NamenodeProtocolgetEditLogManifest in interface NamenodeProtocolsinceTxId - return only logs that contain transactions >= sinceTxIdIOExceptionpublic boolean isMethodSupported(String methodName) throws IOException
ProtocolMetaInterfaceisMethodSupported in interface ProtocolMetaInterfacemethodName - The name of the methodIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.