gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEARPUMP-192) refactor example sources task to use DataSource API
Date Fri, 02 Sep 2016 13:05:20 GMT

    [ https://issues.apache.org/jira/browse/GEARPUMP-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458476#comment-15458476
] 

ASF GitHub Bot commented on GEARPUMP-192:
-----------------------------------------

Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/78#discussion_r77342296
  
    --- Diff: examples/streaming/wordcount/src/main/scala/org/apache/gearpump/streaming/examples/wordcount/Split.scala
---
    @@ -19,34 +19,45 @@
     package org.apache.gearpump.streaming.examples.wordcount
     
     import java.time.Instant
    -import java.util.concurrent.TimeUnit
     
     import org.apache.gearpump.Message
    -import org.apache.gearpump.cluster.UserConfig
    -import org.apache.gearpump.streaming.source.{DataSource, DataSourceTask, Watermark}
    -import org.apache.gearpump.streaming.task.{Task, TaskContext}
    +import org.apache.gearpump.streaming.source.DataSource
    +import org.apache.gearpump.streaming.task.TaskContext
     
    +import scala.collection.mutable.ArrayBuffer
     
    -class Split() extends DataSource {
     
    +class Split extends DataSource {
    +
    +  val result = ArrayBuffer[Message]()
    +  var item = -1
    +  Split.TEXT_TO_SPLIT.lines.foreach { line =>
    +    line.split("[\\s]+").filter(_.nonEmpty).foreach { msg => //  => 为匿名函数,传入一个msg参数执行右边的操作
    --- End diff --
    
    please remove this comment.


> refactor example sources task to use DataSource API
> ---------------------------------------------------
>
>                 Key: GEARPUMP-192
>                 URL: https://issues.apache.org/jira/browse/GEARPUMP-192
>             Project: Apache Gearpump
>          Issue Type: Improvement
>          Components: streaming
>    Affects Versions: 0.8.1
>            Reporter: Manu Zhang
>            Assignee: Kaifang Bao
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message