storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [10/13] storm git commit: Add README entry for EsLookupBolt
Date Thu, 27 Aug 2015 22:12:54 GMT
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 <alex.panov@teradata.com>
Authored: Thu Aug 20 18:01:45 2015 +0200
Committer: Alex Panov <alex.panov@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))


Mime
View raw message