You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apex.apache.org by th...@apache.org on 2016/03/18 06:54:27 UTC
[09/18] incubator-apex-malhar git commit: Fix error in configuration
and add alternative forms
Fix error in configuration and add alternative forms
Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/commit/69bf67bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/tree/69bf67bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/diff/69bf67bb
Branch: refs/heads/devel-3
Commit: 69bf67bbf25f352a4cbe5fab011769afa2654341
Parents: 8c53862
Author: Munagala V. Ramanath <ra...@datatorrent.com>
Authored: Tue Mar 1 16:29:30 2016 -0800
Committer: Thomas Weise <th...@datatorrent.com>
Committed: Fri Mar 11 19:22:48 2016 -0800
----------------------------------------------------------------------
docs/operators/kafkaInputOperator.md | 34 ++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/69bf67bb/docs/operators/kafkaInputOperator.md
----------------------------------------------------------------------
diff --git a/docs/operators/kafkaInputOperator.md b/docs/operators/kafkaInputOperator.md
index 1d2258e..793e255 100644
--- a/docs/operators/kafkaInputOperator.md
+++ b/docs/operators/kafkaInputOperator.md
@@ -266,17 +266,45 @@ public void populateDAG(DAG dag, Configuration entries)
}
}
```
-Below is the configuration for “test” Kafka topic name and
-“localhost:2181” is the zookeeper forum:
+Below is the configuration for using the earliest offset, “test” as the topic name and
+“localhost:2181” as the zookeeper forum:
```xml
<property>
+ <name>dt.operator.MessageReader.prop.initialOffset</name>
+ <value>earliest</value>
+</property>
+
+<property>
<name>dt.operator.MessageReader.prop.topic</name>
<value>test</value>
</property>
<property>
-<name>dt.operator.KafkaInputOperator.prop.zookeeper</nam>
+<name>dt.operator.MessageReader.prop.zookeeper</nam>
<value>localhost:2181</value>
</property>
```
+
+Please note that `MessageReader` is the string passed as the first argument to the
+`addOperator()` call. The above stanza sets these parameters for this operator
+regardless of the application it resides in; if you want to set them on a
+per-application basis, you can use this instead (where `KafkaApp` is the name of
+the application):
+
+```xml
+<property>
+ <name>dt.application.KafkaApp.operator.MessageReader.prop.initialOffset</name>
+ <value>earliest</value>
+</property>
+
+<property>
+ <name>dt.application.KafkaApp.operator.MessageReader.prop.topic</name>
+ <value>test-topic</value>
+</property>
+
+<property>
+ <name>dt.application.KafkaApp.operator.MessageReader.prop.zookeeper</name>
+ <value>node21:2181</value>
+</property>
+```