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 #85: [GEARPUMP-23] add window dsl
Date Tue, 27 Sep 2016 22:23:21 GMT
Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/85#discussion_r80809137
  
    --- Diff: streaming/src/main/scala/org/apache/gearpump/streaming/dsl/Stream.scala ---
    @@ -147,6 +150,33 @@ class Stream[T](
         graph.addEdge(thisNode, edge.getOrElse(Shuffle), processorOp)
         new Stream[R](graph, processorOp, Some(Shuffle))
       }
    +
    +  private def groupByWindow[GROUP](fn: GroupByFn[T, GROUP],
    +      parallelism: Int, description: String): GroupByStream[T, GROUP] = {
    +    val groupOp = GroupByOp[T, GROUP](fn,
    +      parallelism, description)
    +    graph.addVertex(groupOp)
    +    graph.addEdge(thisNode, edge.getOrElse(Shuffle), groupOp)
    +    new GroupByStream[T, GROUP](graph, groupOp)
    +  }
    +
    +}
    +
    +class GroupByStream[T, GROUP](
    +    private val graph: Graph[Op, OpEdge],
    +    private val groupByOp: GroupByOp[T, GROUP],
    +    private val edge: Option[OpEdge] = None) extends Stream[T](graph, groupByOp, edge)
{
    --- End diff --
    
    `private val` is visible to companion object


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