ProtobufRpcEngine.proto 2.7 KB

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