You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2015/08/28 00:12:54 UTC

[10/13] storm git commit: Add README entry for EsLookupBolt

Add README entry for EsLookupBolt


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

Branch: refs/heads/master
Commit: 69c78ca18c62fd9142b8052c20952ed72fc42216
Parents: 4be31c5
Author: Alex Panov <al...@teradata.com>
Authored: Thu Aug 20 18:01:45 2015 +0200
Committer: Alex Panov <al...@teradata.com>
Committed: Thu Aug 20 18:01:45 2015 +0200

----------------------------------------------------------------------
 external/storm-elasticsearch/README.md | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/69c78ca1/external/storm-elasticsearch/README.md
----------------------------------------------------------------------
diff --git a/external/storm-elasticsearch/README.md b/external/storm-elasticsearch/README.md
index 4fa1098..04a3673 100644
--- a/external/storm-elasticsearch/README.md
+++ b/external/storm-elasticsearch/README.md
@@ -34,6 +34,19 @@ EsPercolateBolt percolateBolt = new EsPercolateBolt(esConfig);
 If there exists non-empty percolate response, EsPercolateBolt will emit tuple with original source and Percolate.Match
 for each Percolate.Match in PercolateResponse.
 
+## EsLookupBolt (org.apache.storm.elasticsearch.bolt.EsLookupBolt)
+
+EsLookupBolt performs a get request to Elasticsearch. Incoming tuple is passed to provided GetRequest creator and the result of that execution is passed to Elasticsearch client.
+The bolt then uses the provider output adapter (EsLookupResultOutput) to convert the GetResponse to Values to emit.
+The output fields are also specified by the user of the bolt via the output adapter (EsLookupResultOutput).
+
+```java
+EsConfig esConfig = createEsConfig();
+ElasticsearchGetRequest getRequestAdapter = createElasticsearchGetRequest();
+EsLookupResultOutput output = createOutput();
+EsLookupBolt lookupBolt = new EsLookupBolt(esConfig, getRequestAdapter, output);
+```
+
 ## EsConfig (org.apache.storm.elasticsearch.common.EsConfig)
   
 Two bolts above takes in EsConfig as a constructor arg.
@@ -69,4 +82,4 @@ Elasticsearch Trident state also follows similar pattern to EsBolts. It takes in
 ## Committer Sponsors
 
  * Sriharsha Chintalapani ([@harshach](https://github.com/harshach))
- * Jungtaek Lim ([@HeartSaVioR](https://github.com/HeartSaVioR))
\ No newline at end of file
+ * Jungtaek Lim ([@HeartSaVioR](https://github.com/HeartSaVioR))