Package org.apache.hadoop.ha.protocolPB
Class ZKFCProtocolServerSideTranslatorPB
java.lang.Object
org.apache.hadoop.ha.protocolPB.ZKFCProtocolServerSideTranslatorPB
- All Implemented Interfaces:
org.apache.hadoop.ha.proto.ZKFCProtocolProtos.ZKFCProtocolService.BlockingInterface,ZKFCProtocolPB,VersionedProtocol
@Private
@Stable
public class ZKFCProtocolServerSideTranslatorPB
extends Object
implements ZKFCProtocolPB
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.ha.proto.ZKFCProtocolProtos.CedeActiveResponseProtocedeActive(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.ZKFCProtocolProtos.CedeActiveRequestProto request) getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) Return protocol version corresponding to protocol interface.longgetProtocolVersion(String protocol, long clientVersion) Return protocol version corresponding to protocol interface.org.apache.hadoop.ha.proto.ZKFCProtocolProtos.GracefulFailoverResponseProtogracefulFailover(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.ZKFCProtocolProtos.GracefulFailoverRequestProto request)
-
Constructor Details
-
ZKFCProtocolServerSideTranslatorPB
-
-
Method Details
-
cedeActive
public org.apache.hadoop.ha.proto.ZKFCProtocolProtos.CedeActiveResponseProto cedeActive(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.ZKFCProtocolProtos.CedeActiveRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
cedeActivein interfaceorg.apache.hadoop.ha.proto.ZKFCProtocolProtos.ZKFCProtocolService.BlockingInterface- Throws:
org.apache.hadoop.thirdparty.protobuf.ServiceException
-
gracefulFailover
public org.apache.hadoop.ha.proto.ZKFCProtocolProtos.GracefulFailoverResponseProto gracefulFailover(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.ZKFCProtocolProtos.GracefulFailoverRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
gracefulFailoverin interfaceorg.apache.hadoop.ha.proto.ZKFCProtocolProtos.ZKFCProtocolService.BlockingInterface- Throws:
org.apache.hadoop.thirdparty.protobuf.ServiceException
-
getProtocolVersion
Description copied from interface:VersionedProtocolReturn protocol version corresponding to protocol interface.- Specified by:
getProtocolVersionin interfaceVersionedProtocol- Parameters:
protocol- The classname of the protocol interfaceclientVersion- The version of the protocol that the client speaks- Returns:
- the version that the server will speak
- Throws:
IOException- if any IO error occurs
-
getProtocolSignature
public ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException Description copied from interface:VersionedProtocolReturn protocol version corresponding to protocol interface.- Specified by:
getProtocolSignaturein interfaceVersionedProtocol- Parameters:
protocol- The classname of the protocol interfaceclientVersion- The version of the protocol that the client speaksclientMethodsHash- the hashcode of client protocol methods- Returns:
- the server protocol signature containing its version and a list of its supported methods
- Throws:
IOException- raised on errors performing I/O.- See Also:
-