How to encode method parameters using HadoopRpcRequestProto request field in Hadoop <p>The Hadoop RPC engine uses Protocol Buffer to encode/decodes the bytes from the wire.</p> <p>I am trying to invoke a method on a Hadoop Server using the HadoopRpcRequestProto</p> <pre><code>HadoopRpcRequestProto rpcReHadoopRpcRequestProtoquest; HadoopRpcRequestProto.Builder builder = HadoopRpcRequestProto.newBuilder(); builder.setMethodName("foo"); </code></pre> <p>So if my "foo" method takes two parameters, foo(String name, int num);</p> <p>How do I encode the parameters and set them to the HadoopRpcRequestProto's request field?</p> <p>TIA</p>