streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblack...@apache.org
Subject git commit: resolves STREAMS-116 adding README
Date Mon, 04 Aug 2014 19:03:37 GMT
Repository: incubator-streams
Updated Branches:
  refs/heads/STREAMS-111 9582c0cb7 -> b1f94a6b7


resolves STREAMS-116
adding README


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

Branch: refs/heads/STREAMS-111
Commit: b1f94a6b7ad9d88ffaf393953b8b246eb41364e1
Parents: 9582c0c
Author: sblackmon <sblackmon@w2odigital.com>
Authored: Wed Jun 25 17:36:48 2014 -0500
Committer: sblackmon <sblackmon@w2odigital.com>
Committed: Wed Jun 25 17:36:48 2014 -0500

----------------------------------------------------------------------
 .../streams-persist-elasticsearch/README.md     | 47 ++++++++++++++++++++
 .../elasticsearch/ElasticsearchQuery.java       |  8 ++--
 .../src/main/resources/reference.json           |  9 ++++
 3 files changed, 60 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/b1f94a6b/streams-contrib/streams-persist-elasticsearch/README.md
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-persist-elasticsearch/README.md b/streams-contrib/streams-persist-elasticsearch/README.md
new file mode 100644
index 0000000..fbdf86c
--- /dev/null
+++ b/streams-contrib/streams-persist-elasticsearch/README.md
@@ -0,0 +1,47 @@
+streams-persist-elasticsearch
+=====================
+
+Read and write to Elasticsearch
+
+Example reader configuration:
+
+    "elasticsearch": {
+        "hosts": [
+            "localhost"
+        ],
+        "port": 9300,
+        "clusterName": "elasticsearch",
+        "indexes": [
+            "sourceindex"
+        ],
+        "types": [
+            "sourcetype"
+        ],
+        "_search": {
+            "query" : {
+                "match_all" : { }
+            }
+        }
+    }
+
+Example writer configuration:
+
+    "elasticsearch": {
+        "hosts": [
+            "localhost"
+        ],
+        "port": 9300,
+        "clusterName": "elasticsearch",
+        "index": "destinationindex",
+        "type": "destinationtype
+    }
+
+For more examples, see:
+
+- [elasticsearch-backup](http://github.com/w2ogroup/streams-examples/tree/master/elasticsearch-backup)
+- [elasticsearch-reindex](http://github.com/w2ogroup/streams-examples/tree/master/elasticsearch-reindex)
+- [elasticsearch-restore](http://github.com/w2ogroup/streams-examples/tree/master/elasticsearch-restore)
+- [mongo-elasticsearch-index](https://github.com/w2ogroup/streams-examples/tree/master/mongo-elasticsearch-index)
+- [twitter-gardenhose-elasticsearch](https://github.com/w2ogroup/streams-examples/tree/master/twitter-gardenhose-elasticsearch)
+- [twitter-history-elasticsearch](https://github.com/w2ogroup/streams-examples/tree/master/twitter-history-elasticsearch)
+- [twitter-userstream-elasticsearch](https://github.com/w2ogroup/streams-examples/tree/master/twitter-userstream-elasticsearch)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/b1f94a6b/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchQuery.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchQuery.java
b/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchQuery.java
index 475d93c..55064d3 100644
--- a/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchQuery.java
+++ b/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchQuery.java
@@ -138,19 +138,19 @@ public class ElasticsearchQuery implements Iterable<SearchHit>,
Iterator<SearchH
 
             String searchJson;
             if( config.getSearch() != null ) {
-                LOGGER.info("Have config in Reader: " + config.getSearch().toString());
+                LOGGER.debug("Have config in Reader: " + config.getSearch().toString());
 
                 try {
                     searchJson = mapper.writeValueAsString(config.getSearch());
-                    LOGGER.info("Setting source: " + searchJson);
-                    search = search.setSource(searchJson);
+                    LOGGER.debug("Setting source: " + searchJson);
+                    search = search.setExtraSource(searchJson);
 
                 } catch (JsonProcessingException e) {
                     LOGGER.warn("Could not apply _search supplied by config");
                     e.printStackTrace();
                 }
 
-                LOGGER.info("Search Source is now " + search.toString());
+                LOGGER.debug("Search Source is now " + search.toString());
 
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/b1f94a6b/streams-contrib/streams-persist-elasticsearch/src/main/resources/reference.json
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-persist-elasticsearch/src/main/resources/reference.json
b/streams-contrib/streams-persist-elasticsearch/src/main/resources/reference.json
new file mode 100644
index 0000000..408399c
--- /dev/null
+++ b/streams-contrib/streams-persist-elasticsearch/src/main/resources/reference.json
@@ -0,0 +1,9 @@
+{
+    "elasticsearch": {
+        "hosts": [
+            "localhost"
+        ],
+        "port": 9300,
+        "clusterName": "elasticsearch"
+    }
+}
\ No newline at end of file


Mime
View raw message