You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gearpump.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/01 01:17:20 UTC

[jira] [Commented] (GEARPUMP-192) refactor example sources task to use DataSource API

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

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

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

    https://github.com/apache/incubator-gearpump/pull/78#discussion_r77100932
  
    --- Diff: examples/streaming/wordcount/src/main/scala/org/apache/gearpump/streaming/examples/wordcount/Split.scala ---
    @@ -23,29 +23,34 @@ import java.util.concurrent.TimeUnit
     
     import org.apache.gearpump.Message
     import org.apache.gearpump.cluster.UserConfig
    -import org.apache.gearpump.streaming.source.Watermark
    +import org.apache.gearpump.streaming.source.{DataSource, DataSourceTask, Watermark}
     import org.apache.gearpump.streaming.task.{Task, TaskContext}
     
    -class Split(taskContext: TaskContext, conf: UserConfig) extends Task(taskContext, conf) {
    -  import taskContext.output
     
    -  override def onStart(startTime: Instant): Unit = {
    -    self ! Watermark(Instant.now)
    -  }
    +class Split() extends DataSource {
    --- End diff --
    
    I prefer `class Split extends DataSource`, no braces.


> 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)