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/master Commit: 69bf67bbf25f352a4cbe5fab011769afa2654341 Parents: 8c53862 Author: Munagala V. Ramanath <[email protected]> Authored: Tue Mar 1 16:29:30 2016 -0800 Committer: Thomas Weise <[email protected]> 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> +```
