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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash)
    Return protocol version corresponding to protocol interface.
    long
    getProtocolVersion(String protocol, long clientVersion)
    Return protocol version corresponding to protocol interface.
    org.apache.hadoop.ha.proto.HAServiceProtocolProtos.GetServiceStatusResponseProto
    getServiceStatus(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.GetServiceStatusRequestProto request)
     
    org.apache.hadoop.ha.proto.HAServiceProtocolProtos.MonitorHealthResponseProto
    monitorHealth(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.MonitorHealthRequestProto request)
     
    org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToActiveResponseProto
    transitionToActive(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToActiveRequestProto request)
     
    org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToObserverResponseProto
    transitionToObserver(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToObserverRequestProto request)
     
    org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToStandbyResponseProto
    transitionToStandby(org.apache.hadoop.thirdparty.protobuf.RpcController controller, org.apache.hadoop.ha.proto.HAServiceProtocolProtos.TransitionToStandbyRequestProto request)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HAServiceProtocolServerSideTranslatorPB

      public HAServiceProtocolServerSideTranslatorPB(HAServiceProtocol server)
  • 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:
      monitorHealth in interface org.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:
      transitionToActive in interface org.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:
      transitionToStandby in interface org.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:
      transitionToObserver in interface org.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:
      getServiceStatus in interface org.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceProtocolService.BlockingInterface
      Throws:
      org.apache.hadoop.thirdparty.protobuf.ServiceException
    • getProtocolVersion

      public long getProtocolVersion(String protocol, long clientVersion) throws IOException
      Description copied from interface: VersionedProtocol
      Return protocol version corresponding to protocol interface.
      Specified by:
      getProtocolVersion in interface VersionedProtocol
      Parameters:
      protocol - The classname of the protocol interface
      clientVersion - 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: VersionedProtocol
      Return protocol version corresponding to protocol interface.
      Specified by:
      getProtocolSignature in interface VersionedProtocol
      Parameters:
      protocol - The classname of the protocol interface
      clientVersion - The version of the protocol that the client speaks
      clientMethodsHash - 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: