ProtobufRpcEngine.proto 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Compatibility.html
  21. * for what changes are allowed for a *stable* .proto interface.
  22. */
  23. syntax = "proto2";
  24. /**
  25. * These are the messages used by Hadoop RPC for the Rpc Engine Protocol Buffer
  26. * to marshal the request and response in the RPC layer.
  27. * The messages are sent in addition to the normal RPC header as
  28. * defined in RpcHeader.proto
  29. */
  30. option java_package = "org.apache.hadoop.ipc.protobuf";
  31. option java_outer_classname = "ProtobufRpcEngineProtos";
  32. option java_generate_equals_and_hash = true;
  33. package hadoop.common;
  34. /**
  35. * This message is the header for the Protobuf Rpc Engine
  36. * when sending a RPC request from RPC client to the RPC server.
  37. * The actual request (serialized as protobuf) follows this request.
  38. *
  39. * No special header is needed for the Rpc Response for Protobuf Rpc Engine.
  40. * The normal RPC response header (see RpcHeader.proto) are sufficient.
  41. */
  42. message RequestHeaderProto {
  43. /** Name of the RPC method */
  44. required string methodName = 1;
  45. /**
  46. * RPCs for a particular interface (ie protocol) are done using a
  47. * IPC connection that is setup using rpcProxy.
  48. * The rpcProxy's has a declared protocol name that is
  49. * sent form client to server at connection time.
  50. *
  51. * Each Rpc call also sends a protocol name
  52. * (called declaringClassprotocolName). This name is usually the same
  53. * as the connection protocol name except in some cases.
  54. * For example metaProtocols such ProtocolInfoProto which get metainfo
  55. * about the protocol reuse the connection but need to indicate that
  56. * the actual protocol is different (i.e. the protocol is
  57. * ProtocolInfoProto) since they reuse the connection; in this case
  58. * the declaringClassProtocolName field is set to the ProtocolInfoProto
  59. */
  60. required string declaringClassProtocolName = 2;
  61. /** protocol version of class declaring the called method */
  62. required uint64 clientProtocolVersion = 3;
  63. /** protocol extensions */
  64. extensions 1000 to max;
  65. }