Class InterDatanodeProtocolTranslatorPB
java.lang.Object
org.apache.hadoop.hdfs.protocolPB.InterDatanodeProtocolTranslatorPB
- All Implemented Interfaces:
Closeable,AutoCloseable,InterDatanodeProtocol,org.apache.hadoop.ipc.ProtocolMetaInterface
@Private
@Stable
public class InterDatanodeProtocolTranslatorPB
extends Object
implements org.apache.hadoop.ipc.ProtocolMetaInterface, InterDatanodeProtocol, Closeable
This class is the client side translator to translate the requests made on
InterDatanodeProtocol interfaces to the RPC server implementing
InterDatanodeProtocolPB.-
Field Summary
Fields inherited from interface org.apache.hadoop.hdfs.server.protocol.InterDatanodeProtocol
LOG, versionID -
Constructor Summary
ConstructorsConstructorDescriptionInterDatanodeProtocolTranslatorPB(InetSocketAddress addr, org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.conf.Configuration conf, SocketFactory factory, int socketTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Initialize a replica recovery.booleanisMethodSupported(String methodName) updateReplicaUnderRecovery(org.apache.hadoop.hdfs.protocol.ExtendedBlock oldBlock, long recoveryId, long newBlockId, long newLength) Update replica with the new generation stamp and length.
-
Constructor Details
-
InterDatanodeProtocolTranslatorPB
public InterDatanodeProtocolTranslatorPB(InetSocketAddress addr, org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.conf.Configuration conf, SocketFactory factory, int socketTimeout) throws IOException - Throws:
IOException
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
initReplicaRecovery
public ReplicaRecoveryInfo initReplicaRecovery(BlockRecoveryCommand.RecoveringBlock rBlock) throws IOException Description copied from interface:InterDatanodeProtocolInitialize a replica recovery.- Specified by:
initReplicaRecoveryin interfaceInterDatanodeProtocol- Returns:
- actual state of the replica on this data-node or null if data-node does not have the replica.
- Throws:
IOException
-
updateReplicaUnderRecovery
public String updateReplicaUnderRecovery(org.apache.hadoop.hdfs.protocol.ExtendedBlock oldBlock, long recoveryId, long newBlockId, long newLength) throws IOException Description copied from interface:InterDatanodeProtocolUpdate replica with the new generation stamp and length.- Specified by:
updateReplicaUnderRecoveryin interfaceInterDatanodeProtocol- Throws:
IOException
-
isMethodSupported
- Specified by:
isMethodSupportedin interfaceorg.apache.hadoop.ipc.ProtocolMetaInterface- Throws:
IOException
-