ProtocolInfo.proto 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. /**
  19. * These .proto interfaces are private and stable.
  20. * Please see http://wiki.apache.org/hadoop/Compatibility
  21. * for what changes are allowed for a *stable* .proto interface.
  22. */
  23. syntax = "proto2";
  24. option java_package = "org.apache.hadoop.ipc.protobuf";
  25. option java_outer_classname = "ProtocolInfoProtos";
  26. option java_generic_services = true;
  27. option java_generate_equals_and_hash = true;
  28. package hadoop.common;
  29. /**
  30. * Request to get protocol versions for all supported rpc kinds.
  31. */
  32. message GetProtocolVersionsRequestProto {
  33. required string protocol = 1; // Protocol name
  34. }
  35. /**
  36. * Protocol version with corresponding rpc kind.
  37. */
  38. message ProtocolVersionProto {
  39. required string rpcKind = 1; //RPC kind
  40. repeated uint64 versions = 2; //Protocol version corresponding to the rpc kind.
  41. }
  42. /**
  43. * Get protocol version response.
  44. */
  45. message GetProtocolVersionsResponseProto {
  46. repeated ProtocolVersionProto protocolVersions = 1;
  47. }
  48. /**
  49. * Get protocol signature request.
  50. */
  51. message GetProtocolSignatureRequestProto {
  52. required string protocol = 1; // Protocol name
  53. required string rpcKind = 2; // RPC kind
  54. }
  55. /**
  56. * Get protocol signature response.
  57. */
  58. message GetProtocolSignatureResponseProto {
  59. repeated ProtocolSignatureProto protocolSignature = 1;
  60. }
  61. message ProtocolSignatureProto {
  62. required uint64 version = 1;
  63. repeated uint32 methods = 2;
  64. }
  65. /**
  66. * Protocol to get information about protocols.
  67. */
  68. service ProtocolInfoService {
  69. /**
  70. * Return protocol version corresponding to protocol interface for each
  71. * supported rpc kind.
  72. */
  73. rpc getProtocolVersions(GetProtocolVersionsRequestProto)
  74. returns (GetProtocolVersionsResponseProto);
  75. /**
  76. * Return protocol version corresponding to protocol interface.
  77. */
  78. rpc getProtocolSignature(GetProtocolSignatureRequestProto)
  79. returns (GetProtocolSignatureResponseProto);
  80. }