ProtocolInfo.proto 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. option java_package = "org.apache.hadoop.ipc.protobuf";
  19. option java_outer_classname = "ProtocolInfoProtos";
  20. option java_generic_services = true;
  21. option java_generate_equals_and_hash = true;
  22. /**
  23. * Request to get protocol versions for all supported rpc kinds.
  24. */
  25. message GetProtocolVersionsRequestProto {
  26. required string protocol = 1; // Protocol name
  27. }
  28. /**
  29. * Protocol version with corresponding rpc kind.
  30. */
  31. message ProtocolVersionProto {
  32. required string rpcKind = 1; //RPC kind
  33. repeated uint64 versions = 2; //Protocol version corresponding to the rpc kind.
  34. }
  35. /**
  36. * Get protocol version response.
  37. */
  38. message GetProtocolVersionsResponseProto {
  39. repeated ProtocolVersionProto protocolVersions = 1;
  40. }
  41. /**
  42. * Get protocol signature request.
  43. */
  44. message GetProtocolSignatureRequestProto {
  45. required string protocol = 1; // Protocol name
  46. required string rpcKind = 2; // RPC kind
  47. }
  48. /**
  49. * Get protocol signature response.
  50. */
  51. message GetProtocolSignatureResponseProto {
  52. repeated ProtocolSignatureProto protocolSignature = 1;
  53. }
  54. message ProtocolSignatureProto {
  55. required uint64 version = 1;
  56. repeated uint32 methods = 2;
  57. }
  58. /**
  59. * Protocol to get information about protocols.
  60. */
  61. service ProtocolInfoService {
  62. /**
  63. * Return protocol version corresponding to protocol interface for each
  64. * supported rpc kind.
  65. */
  66. rpc getProtocolVersions(GetProtocolVersionsRequestProto)
  67. returns (GetProtocolVersionsResponseProto);
  68. /**
  69. * Return protocol version corresponding to protocol interface.
  70. */
  71. rpc getProtocolSignature(GetProtocolSignatureRequestProto)
  72. returns (GetProtocolSignatureResponseProto);
  73. }