List of usage examples for org.apache.hadoop.ipc RPC getProtocolName
static public String getProtocolName(Class<?> protocol)
From source file:org.apache.hoya.yarn.appmaster.rpc.HoyaClusterProtocolProxy.java
License:Apache License
@Override public ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException { if (!protocol.equals(RPC.getProtocolName(HoyaClusterProtocolPB.class))) { throw new IOException("Serverside implements " + RPC.getProtocolName(HoyaClusterProtocolPB.class) + ". The following requested protocol is unknown: " + protocol); }/*from ww w. j a va2 s . c o m*/ return ProtocolSignature.getProtocolSignature(clientMethodsHash, RPC.getProtocolVersion(HoyaClusterProtocol.class), HoyaClusterProtocol.class); }
From source file:org.apache.slider.server.appmaster.rpc.SliderClusterProtocolProxy.java
License:Apache License
@Override public ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException { if (!protocol.equals(RPC.getProtocolName(SliderClusterProtocolPB.class))) { throw new IOException("Serverside implements " + RPC.getProtocolName(SliderClusterProtocolPB.class) + ". The following requested protocol is unknown: " + protocol); }// w w w .j a va2s .c o m return ProtocolSignature.getProtocolSignature(clientMethodsHash, RPC.getProtocolVersion(SliderClusterProtocol.class), SliderClusterProtocol.class); }