clean up documentation
switch to ActivityConverterProcessor
confirmed working
diff --git a/local/twitter-history-elasticsearch/README.md b/local/twitter-history-elasticsearch/README.md
index 649953b..0ccce34 100644
--- a/local/twitter-history-elasticsearch/README.md
+++ b/local/twitter-history-elasticsearch/README.md
@@ -53,27 +53,26 @@
type = activity
}
-In the Twitter section you should place all of your relevant authentication keys and whichever Twitter IDs you're looking to follow
+In the Twitter section you should place all of your relevant authentication keys and whichever Twitter IDs you want to pull history for.
+
Twitter IDs can be converted from screennames at http://www.gettwitterid.com
-Running:
+Build:
+---------
+
+`mvn clean package verify`
+
+Run:
--------
-You will need to run `./install_templates.sh` in the resources folder in order to apply the templates to your ES cluster
+ java -cp target/twitter-history-elasticsearch-0.2-incubating-SNAPSHOT.jar -Dconfig.file=application.conf org.apache.streams.example.twitter.TwitterHistoryElasticsearch
- java -cp target/twitter-history-elasticsearch-0.1-SNAPSHOT.jar -Dconfig.file=application.conf org.apache.streams.twitter.example.TwitterHistoryElasticsearchActivity
+Deploy:
+--------
+`mvn -Pdocker clean package docker:build`
-Note that you must modify src/main/resources/application.conf, and supply an absolute path to config.file
+`docker tag twitter-history-elasticsearch:0.2-incubating-SNAPSHOT <dockerregistry>:elasticsearch-reindex:0.2-incubating-SNAPSHOT`
-Verification:
--------------
-Open up http://localhost:9200/_plugin/head/ and confirm that the index you specified now contains has data
+`docker push <dockerregistry>:twitter-history-elasticsearch:0.2-incubating-SNAPSHOT`
-Download https://github.com/w2ogroup/streams-examples/blob/master/twitter-history-elasticsearch/src/main/resources/reports/ActivityReport.json
-
-Open up http://localhost:9200/_plugin/marvel and from the folder icon in the top right hand corner click
- Load -> Advanced -> Choose File and select the report you downloaded
-
-The gear on the top-right allows you to change the report index
-
-You should now see dashboards displaying metrics about your twitter activity
\ No newline at end of file
+`docker run <dockerregistry>:twitter-history-elasticsearch:0.2-incubating-SNAPSHOT.jar java -cp twitter-history-elasticsearch-0.2-incubating-SNAPSHOT.jar -Dconfig.file=http://<location_of_config_file>.json org.apache.streams.example.twitter.TwitterHistoryElasticsearch`
diff --git a/local/twitter-history-elasticsearch/TwitterHistoryElasticsearch.png b/local/twitter-history-elasticsearch/TwitterHistoryElasticsearch.png
index d17e1cd..0a87125 100644
--- a/local/twitter-history-elasticsearch/TwitterHistoryElasticsearch.png
+++ b/local/twitter-history-elasticsearch/TwitterHistoryElasticsearch.png
Binary files differ
diff --git a/local/twitter-history-elasticsearch/pom.xml b/local/twitter-history-elasticsearch/pom.xml
index 06855c1..4adabb2 100644
--- a/local/twitter-history-elasticsearch/pom.xml
+++ b/local/twitter-history-elasticsearch/pom.xml
@@ -96,6 +96,12 @@
<groupId>org.apache.streams</groupId>
<artifactId>streams-provider-twitter</artifactId>
<version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
@@ -293,4 +299,44 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- The Docker Maven plugin is used to create docker image with the fat jar -->
+ <groupId>org.jolokia</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.11.0</version>
+ <configuration>
+ <images>
+
+ <image>
+ <alias>${project.artifactId}</alias>
+ <name>${project.artifactId}:${project.version}</name>
+ <build>
+ <from>dockerfile/java:oracle-java8</from>
+ <assembly>
+ <basedir>/</basedir>
+ <descriptorRef>artifact</descriptorRef>
+ </assembly>
+ <!-- Default command for the build image -->
+ </build>
+
+ </image>
+
+ </images>
+ </configuration>
+
+ </plugin>
+
+ </plugins>
+ </build>
+ <activation>
+ <activeByDefault/>
+ </activation>
+ </profile>
+ </profiles>
</project>
diff --git a/local/twitter-history-elasticsearch/src/main/java/org/apache/streams/example/twitter/TwitterHistoryElasticsearch.java b/local/twitter-history-elasticsearch/src/main/java/org/apache/streams/example/twitter/TwitterHistoryElasticsearch.java
index 2e1c886..49dcd42 100644
--- a/local/twitter-history-elasticsearch/src/main/java/org/apache/streams/example/twitter/TwitterHistoryElasticsearch.java
+++ b/local/twitter-history-elasticsearch/src/main/java/org/apache/streams/example/twitter/TwitterHistoryElasticsearch.java
@@ -23,6 +23,7 @@
import com.typesafe.config.Config;
import org.apache.streams.config.ComponentConfigurator;
import org.apache.streams.config.StreamsConfigurator;
+import org.apache.streams.converter.ActivityConverterProcessor;
import org.apache.streams.core.StreamBuilder;
import org.apache.streams.elasticsearch.ElasticsearchConfigurator;
import org.apache.streams.elasticsearch.ElasticsearchPersistWriter;
@@ -76,7 +77,7 @@
public void run() {
TwitterTimelineProvider provider = new TwitterTimelineProvider(config.getTwitter(), ObjectNode.class);
- TwitterTypeConverter converter = new TwitterTypeConverter(ObjectNode.class, Activity.class);
+ ActivityConverterProcessor converter = new ActivityConverterProcessor();
ElasticsearchPersistWriter writer = new ElasticsearchPersistWriter(config.getElasticsearch());
StreamBuilder builder = new LocalStreamBuilder(500);
diff --git a/local/twitter-history-elasticsearch/src/main/resources/TwitterHistoryElasticsearch.dot b/local/twitter-history-elasticsearch/src/main/resources/TwitterHistoryElasticsearch.dot
index e13af61..525c61d 100644
--- a/local/twitter-history-elasticsearch/src/main/resources/TwitterHistoryElasticsearch.dot
+++ b/local/twitter-history-elasticsearch/src/main/resources/TwitterHistoryElasticsearch.dot
@@ -4,7 +4,7 @@
TwitterTimelineProvider [label="TwitterTimelineProvider",shape=ellipse,URL="https://github.com/apache/incubator-streams/blob/master/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java"];
//processors
- TwitterTypeConverter [label="TwitterTypeConverter",shape=box,URL="https://github.com/apache/incubator-streams/blob/master/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/processor/TwitterTypeConverter.java"];
+ ActivityConverterProcessor [label="ActivityConverterProcessor",shape=box,URL="https://github.com/apache/incubator-streams/blob/master/streams-components/streams-converters/src/main/java/org/apache/streams/converter/ActivityConverterProcessor.java"];
//persisters
ElasticsearchPersistWriter [label="ElasticsearchPersistWriter",shape=ellipse,URL="https://github.com/apache/incubator-streams/blob/master/streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchPersistWriter.java"];
@@ -13,8 +13,8 @@
es [label="es://{index}/{type}",shape=box];
//stream
- TwitterTimelineProvider -> TwitterTypeConverter [label="ObjectNode"];
- TwitterTypeConverter -> ElasticsearchPersistWriter [label="Activity",URL="https://github.com/apache/incubator-streams/blob/master/streams-pojo/src/main/jsonschema/org/apache/streams/pojo/json/activity.json"];
+ TwitterTimelineProvider -> ActivityConverterProcessor [label="ObjectNode"];
+ ActivityConverterProcessor -> ElasticsearchPersistWriter [label="Activity",URL="https://github.com/apache/incubator-streams/blob/master/streams-pojo/src/main/jsonschema/org/apache/streams/pojo/json/activity.json"];
ElasticsearchPersistWriter -> es [label="Activity",URL="https://github.com/apache/incubator-streams/blob/master/streams-pojo/src/main/jsonschema/org/apache/streams/pojo/json/activity.json"];
diff --git a/local/twitter-history-elasticsearch/twitter-history-elasticsearch.png b/local/twitter-history-elasticsearch/twitter-history-elasticsearch.png
deleted file mode 100644
index d17e1cd..0000000
--- a/local/twitter-history-elasticsearch/twitter-history-elasticsearch.png
+++ /dev/null
Binary files differ