user3282540
user3282540

Reputation: 21

Storm BasicDRPC client execute

I am a beginner storm user. I am trying out drpc server in remote mode. I got drpc server started and configured the drpc server location in yaml file. BUT, I am not understanding how the drpc client code should look like: https://github.com/nathanmarz/storm-starter/blob/master/src/jvm/storm/starter/BasicDRPCTopology.java

Here is what I did:

  1. Launched DRPC server(s) (storm drpc command)
  2. Configure the locations of the DRPC servers (edited the yaml file. Added the local host name)
  3. Submit DRPC topologies to Storm cluster - did this, looks like the topology is up and running.

But how do I get a client to call/execute on this topology? Do I need something like this?https://github.com/mykidong/storm-finagle-drpc-client/blob/master/src/main/java/storm/finagle/drpc/StormDrpcClient.java ?? I tried but I keep getting this error:

storm/starter/DRPCClient.java:[68,18] error: execute(String,String) in DRPCClient cannot implement execute(String,String) in Iface [ERROR] overridden method does not throw TException

What am I missing here? thanks

Upvotes: 0

Views: 1701

Answers (1)

yaphet
yaphet

Reputation: 310

Here is Storm DRPC Document Maybe useful to understand DRPC Call :)

Just Like following code :

DRPCClient client = new DRPCClient("drpc-host", 3772);
String result = client.execute("reach", "http://twitter.com");

Create a client connection to DRPC-Server-Host: drpc-host at 3772 port .

DRPCClient called "reach" function using argument "http://twitter.com"

and return a string named result

Upvotes: 2

Related Questions