Package org.apache.hadoop.ha.protocolPB
Class HAServiceProtocolServerSideTranslatorPB
java.lang.Object
org.apache.hadoop.ha.protocolPB.HAServiceProtocolServerSideTranslatorPB
- All Implemented Interfaces:
org.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.BlockingInterface,HAServiceProtocolPB,VersionedProtocol
@Private
@Stable
public class HAServiceProtocolServerSideTranslatorPB
extends Object
implements HAServiceProtocolPB
This class is used on the server side. Calls come across the wire for the
for protocol
HAServiceProtocolPB.
This class translates the PB data types
to the native data types used inside the NN as specified in the generic
ClientProtocol.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProtocolSignature(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.HAServiceProtocolProtos.GetServiceStatusResponseProtogetServiceStatus(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.GetServiceStatusRequestProto request) org.apache.hadoop.ha.proto.HAServiceProtocolProtos.MonitorHealthResponseProtomonitorHealth(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.MonitorHealthRequestProto request) org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToActiveResponsePrototransitionToActive(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToActiveRequestProto request) org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToObserverResponsePrototransitionToObserver(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToObserverRequestProto request) org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToStandbyResponsePrototransitionToStandby(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToStandbyRequestProto request)
-
Constructor Details
-
HAServiceProtocolServerSideTranslatorPB
-
-
Method Details
-
monitorHealth
public org.apache.hadoop.ha.proto.HAServiceProtocolProtos.MonitorHealthResponseProto monitorHealth(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.MonitorHealthRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
monitorHealthin interfaceorg.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.BlockingInterface- Throws:
org.apache.hadoop.thirdparty.protobuf.ServiceException
-
transitionToActive
public org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToActiveResponseProto transitionToActive(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToActiveRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
transitionToActivein interfaceorg.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.BlockingInterface- Throws:
org.apache.hadoop.thirdparty.protobuf.ServiceException
-
transitionToStandby
public org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToStandbyResponseProto transitionToStandby(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToStandbyRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
transitionToStandbyin interfaceorg.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.BlockingInterface- Throws:
org.apache.hadoop.thirdparty.protobuf.ServiceException
-
transitionToObserver
public org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToObserverResponseProto transitionToObserver(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToObserverRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
transitionToObserverin interfaceorg.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.BlockingInterface- Throws:
org.apache.hadoop.thirdparty.protobuf.ServiceException
-
getServiceStatus
public org.apache.hadoop.ha.proto.HAServiceProtocolProtos.GetServiceStatusResponseProto getServiceStatus(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.GetServiceStatusRequestProto request) throws org.apache.hadoop.thirdparty.protobuf.ServiceException - Specified by:
getServiceStatusin interfaceorg.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.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:
-