use of org.apache.hadoop.ipc.protobuf.ProtocolInfoProtos.ProtocolSignatureProto in project hadoop by apache.
the class RpcClientUtil method convertProtocolSignatureProtos.
private static Map<Long, ProtocolSignature> convertProtocolSignatureProtos(List<ProtocolSignatureProto> protoList) {
Map<Long, ProtocolSignature> map = new TreeMap<Long, ProtocolSignature>();
for (ProtocolSignatureProto p : protoList) {
int[] methods = new int[p.getMethodsList().size()];
int index = 0;
for (int m : p.getMethodsList()) {
methods[index++] = m;
}
map.put(p.getVersion(), new ProtocolSignature(p.getVersion(), methods));
}
return map;
}
Aggregations