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/5353fddd Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/tree/5353fddd Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/diff/5353fddd Branch: refs/heads/master Commit: 5353fdddcb7b49997f2a862beee13103fc4012cd Parents: 5fd1fa9 Author: Munagala V. Ramanath <[email protected]> Authored: Tue Mar 1 16:29:30 2016 -0800 Committer: Thomas Weise <[email protected]> Committed: Fri Mar 11 12:43:07 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/5353fddd/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> +```
