ProtobufRpcEngine.proto 2.6 KB

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