[
https://issues.apache.org/jira/browse/FLINK-3551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15726027#comment-15726027
]
ASF GitHub Bot commented on FLINK-3551:
---------------------------------------
Github user thvasilo commented on a diff in the pull request:
https://github.com/apache/flink/pull/2761#discussion_r91119469
--- Diff:
flink-examples/flink-examples-streaming/src/main/scala/org/apache/flink/streaming/scala/examples/ml/IncrementalLearningSkeleton.scala
---
@@ -159,11 +160,46 @@ object IncrementalLearningSkeleton {
* Builds up-to-date partial models on new training data.
*/
private class PartialModelBuilder extends AllWindowFunction[Int,
Array[Double], TimeWindow] {
+
+ protected def buildPartialModel(values: Iterable[Int]): Array[Double]
= Array[Double](1)
+
override def apply(window: TimeWindow,
- input: Iterable[Int],
+ values: Iterable[Int],
out: Collector[Array[Double]]): Unit = {
- out.collect(Array[Double](1.0))
+ out.collect(buildPartialModel(values))
+ }
+ }
+
+ /**
+ * Creates newData using the model produced in batch-processing and the
+ * up-to-date partial model.
+ * <p>
+ * By defaults emits the Integer 0 for every newData and the Integer 1
--- End diff --
Typo: "defaults" should be "default"
> Sync Scala and Java Streaming Examples
> --------------------------------------
>
> Key: FLINK-3551
> URL: https://issues.apache.org/jira/browse/FLINK-3551
> Project: Flink
> Issue Type: Sub-task
> Components: Examples
> Affects Versions: 1.0.0
> Reporter: Stephan Ewen
> Assignee: Lim Chee Hau
> Fix For: 1.0.1
>
>
> The Scala Examples lack behind the Java Examples
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)