Hi , thanks
I found the following sentences:” The first bolt you declare will take in as
input 2-tuples, where the first field is the request id and the second field is
the arguments for that request. LinearDRPCTopologyBuilder expects the last bolt
to emit an output stream containing 2-tuples of the form [id, result]. Finally,
all intermediate tuples must contain the request id as the first field.”
I tried to add one more field in the declareOutputFields function, and I get
the following error message: “Output stream of last component in
LinearDRPCTopology must contain exactly two fields. The first should be the
request id, and the second should be the result.”
Does that mean the ‘id’ field is a fixed field in the tuple and be ignored in
the “drpc.execute("exclamation", word)”. The returned value must be the second
field.
Is my word correnct?
发件人: 肖康(Kang Xiao) [mailto:[email protected]]
发送时间: 2014年10月21日 23:24
收件人: [email protected]
主题: Re: DRPC problem
hi Junfeng,
http://storm.apache.org/documentation/Distributed-RPC.html is useful for you to
understand how DRPC works.
LocalDRPC is generated from clj code
https://github.com/apache/storm/blob/master/storm-core/src/clj/backtype/storm/LocalDRPC.clj.
On Mon, Oct 20, 2014 at 2:14 PM, Junfeng Chen <[email protected]
<mailto:[email protected]> > wrote:
Hi, I am a newbie for the Storm. Now I meet a problem about DRPC.
In the BasicDRPCTopology of sample code, drpc.execute("exclamation", word)
return a String as the result. I don’t understand how the DRPC return the
emitted value in ExclaimBolt as it declares two Tuples as output format, while
it just return "result" field. I tried to discover the source code but no
source file of the class “LocalDRPC” can be found in
storm-core\src\jvm\backtype\storm path. Could somebody explain for me? Thanks a
lot.
Regard,
Junfeng Chen
--
Best Regards!
Kang Xiao,<[email protected] <mailto:[email protected]> >
Distributed Software Engineer