You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/03/30 19:16:00 UTC

storm git commit: Merge branch '1.x-branch' of https://github.com/rauluka/storm into STORM-3006

Repository: storm
Updated Branches:
  refs/heads/master 2155b43fd -> dd0348e18


Merge branch '1.x-branch' of https://github.com/rauluka/storm into STORM-3006

STORM-3006: updated-DRPC-docs

This closes #2604


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/dd0348e1
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/dd0348e1
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/dd0348e1

Branch: refs/heads/master
Commit: dd0348e18101f482c7f82d0db04b4307fee509d8
Parents: 2155b43
Author: Robert Evans <ev...@yahoo-inc.com>
Authored: Fri Mar 30 12:08:19 2018 -0500
Committer: Robert Evans <ev...@yahoo-inc.com>
Committed: Fri Mar 30 14:15:40 2018 -0500

----------------------------------------------------------------------
 docs/Distributed-RPC.md | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/dd0348e1/docs/Distributed-RPC.md
----------------------------------------------------------------------
diff --git a/docs/Distributed-RPC.md b/docs/Distributed-RPC.md
index 79b12d9..9931e69 100644
--- a/docs/Distributed-RPC.md
+++ b/docs/Distributed-RPC.md
@@ -12,7 +12,12 @@ DRPC is not so much a feature of Storm as it is a pattern expressed from Storm's
 Distributed RPC is coordinated by a "DRPC server" (Storm comes packaged with an implementation of this). The DRPC server coordinates receiving an RPC request, sending the request to the Storm topology, receiving the results from the Storm topology, and sending the results back to the waiting client. From a client's perspective, a distributed RPC call looks just like a regular RPC call. For example, here's how a client would compute the results for the "reach" function with the argument "http://twitter.com":
 
 ```java
-DRPCClient client = new DRPCClient("drpc-host", 3772);
+Config conf = new Config();
+conf.put("storm.thrift.transport", "org.apache.storm.security.auth.plain.PlainSaslTransportPlugin");
+conf.put(Config.STORM_NIMBUS_RETRY_TIMES, 3);
+conf.put(Config.STORM_NIMBUS_RETRY_INTERVAL, 10);
+conf.put(Config.STORM_NIMBUS_RETRY_INTERVAL_CEILING, 20);
+DRPCClient client = new DRPCClient(conf, "drpc-host", 3772);
 String result = client.execute("reach", "http://twitter.com");
 ```
 
@@ -76,19 +81,20 @@ Using DRPC on an actual cluster is also straightforward. There's three steps:
 2. Configure the locations of the DRPC servers
 3. Submit DRPC topologies to Storm cluster
 
-First you need to configure your storm cluster to use teh DRPC servers.  This is how the `DRPCSpout` and the `DRPCClient` knows which hosts to talk to. This can be done through the `storm.yaml` file or the topology configurations. At a minimum `drpc.servers` should be set, but if you want to use the REST API you also need to set a port for it through `drpc.http.port`.
+Launching a DRPC server can be done with the `storm` script and is just like launching Nimbus or the UI:
+
+```
+bin/storm drpc
+```
+
+Next, you need to configure your Storm cluster to know the locations of the DRPC server(s). This is how `DRPCSpout` knows from where to read function invocations. This can be done through the `storm.yaml` file or the topology configurations. You should also specify storm.thrift.transport property to match DRPCClient settings. Configuring this through the `storm.yaml` looks something like this:
 
 ```yaml
 drpc.servers:
   - "drpc1.foo.com"
   - "drpc2.foo.com"
 drpc.http.port: 8081
-```
-
-Launching a DRPC server can be done with the `storm` script and is just like launching Nimbus or the UI:
-
-```
-bin/storm drpc
+storm.thrift.transport: "org.apache.storm.security.auth.plain.PlainSaslTransportPlugin"
 ```
 
 Finally, you launch DRPC topologies using `StormSubmitter` just like you launch any other topology. To run the above example in remote mode, you do something like this: