Java Code Examples for org.apache.hadoop.ipc.RPC#getProtocolName()

The following examples show how to use org.apache.hadoop.ipc.RPC#getProtocolName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HAServiceProtocolServerSideTranslatorPB.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public ProtocolSignature getProtocolSignature(String protocol,
    long clientVersion, int clientMethodsHash) throws IOException {
  if (!protocol.equals(RPC.getProtocolName(HAServiceProtocolPB.class))) {
    throw new IOException("Serverside implements " +
        RPC.getProtocolName(HAServiceProtocolPB.class) +
        ". The following requested protocol is unknown: " + protocol);
  }

  return ProtocolSignature.getProtocolSignature(clientMethodsHash,
      RPC.getProtocolVersion(HAServiceProtocolPB.class),
      HAServiceProtocolPB.class);
}
 
Example 2
Source File: ZKFCProtocolServerSideTranslatorPB.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public ProtocolSignature getProtocolSignature(String protocol,
    long clientVersion, int clientMethodsHash) throws IOException {
  if (!protocol.equals(RPC.getProtocolName(ZKFCProtocolPB.class))) {
    throw new IOException("Serverside implements " +
        RPC.getProtocolName(ZKFCProtocolPB.class) +
        ". The following requested protocol is unknown: " + protocol);
  }

  return ProtocolSignature.getProtocolSignature(clientMethodsHash,
      RPC.getProtocolVersion(ZKFCProtocolPB.class),
      HAServiceProtocolPB.class);
}
 
Example 3
Source File: TraceAdminProtocolServerSideTranslatorPB.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public ProtocolSignature getProtocolSignature(String protocol,
        long clientVersion, int clientMethodsHash) throws IOException {
  if (!protocol.equals(RPC.getProtocolName(TraceAdminProtocolPB.class))) {
    throw new IOException("Serverside implements " +
        RPC.getProtocolName(TraceAdminProtocolPB.class) +
        ". The following requested protocol is unknown: " + protocol);
  }
  return ProtocolSignature.getProtocolSignature(clientMethodsHash,
      RPC.getProtocolVersion(TraceAdminProtocolPB.class),
      TraceAdminProtocolPB.class);
}
 
Example 4
Source File: HAServiceProtocolServerSideTranslatorPB.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public ProtocolSignature getProtocolSignature(String protocol,
    long clientVersion, int clientMethodsHash) throws IOException {
  if (!protocol.equals(RPC.getProtocolName(HAServiceProtocolPB.class))) {
    throw new IOException("Serverside implements " +
        RPC.getProtocolName(HAServiceProtocolPB.class) +
        ". The following requested protocol is unknown: " + protocol);
  }

  return ProtocolSignature.getProtocolSignature(clientMethodsHash,
      RPC.getProtocolVersion(HAServiceProtocolPB.class),
      HAServiceProtocolPB.class);
}
 
Example 5
Source File: ZKFCProtocolServerSideTranslatorPB.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public ProtocolSignature getProtocolSignature(String protocol,
    long clientVersion, int clientMethodsHash) throws IOException {
  if (!protocol.equals(RPC.getProtocolName(ZKFCProtocolPB.class))) {
    throw new IOException("Serverside implements " +
        RPC.getProtocolName(ZKFCProtocolPB.class) +
        ". The following requested protocol is unknown: " + protocol);
  }

  return ProtocolSignature.getProtocolSignature(clientMethodsHash,
      RPC.getProtocolVersion(ZKFCProtocolPB.class),
      HAServiceProtocolPB.class);
}
 
Example 6
Source File: TraceAdminProtocolServerSideTranslatorPB.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public ProtocolSignature getProtocolSignature(String protocol,
        long clientVersion, int clientMethodsHash) throws IOException {
  if (!protocol.equals(RPC.getProtocolName(TraceAdminProtocolPB.class))) {
    throw new IOException("Serverside implements " +
        RPC.getProtocolName(TraceAdminProtocolPB.class) +
        ". The following requested protocol is unknown: " + protocol);
  }
  return ProtocolSignature.getProtocolSignature(clientMethodsHash,
      RPC.getProtocolVersion(TraceAdminProtocolPB.class),
      TraceAdminProtocolPB.class);
}