gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manuzhang <...@git.apache.org>
Subject [GitHub] incubator-gearpump pull request: fix GEARPUMP-122, refactor kafka ...
Date Fri, 27 May 2016 07:14:20 GMT
Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/25#discussion_r64865818
  
    --- Diff: examples/streaming/kafka/src/main/scala/org/apache/gearpump/streaming/examples/kafka/KafkaReadWrite.scala
---
    @@ -60,14 +64,19 @@ object KafkaReadWrite extends AkkaApp with ArgumentsParser {
         val sinkTopic = config.getString("sinkTopic")
     
         val appConfig = UserConfig.empty
    -    val offsetStorageFactory = new KafkaStorageFactory(zookeeperConnect, brokerList)
    -    val source = new KafkaSource(sourceTopic, zookeeperConnect, offsetStorageFactory)
    +    val props = new Properties
    +    props.put(KafkaConfig.ZOOKEEPER_CONNECT_CONFIG, zookeeperConnect)
    +    props.put(KafkaConfig.BOOTSTRAP_SERVERS_CONFIG, brokerList)
    +    props.put(KafkaConfig.CHECKPOINT_STORE_NAME_PREFIX_CONFIG, appName)
    +    val source = new KafkaSource(sourceTopic, props)
    +    val checkpointStoreFactory = new KafkaStoreFactory(props)
    +    source.checkpoint(checkpointStoreFactory)
    --- End diff --
    
    then kafka offsets will not be checkpointed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message