提交 1ec0d10a 编写于 作者: U Ufuk Celebi

[docs] Fix TumblingTimeWindows.of(AbstractTime) examples

Added Time.of(Time), because there is no TumblingTimeWindows.of(int, TimeUnit).
上级 477651b0
......@@ -578,7 +578,7 @@ keyedStream.maxBy("key");
key according to some characteristic (e.g., the data that arrived within the last 5 seconds).
See <a href="#windows">windows</a> for a complete description of windows.
{% highlight java %}
dataStream.keyBy(0).window(TumblingTimeWindows.of(5, TimeUnit.SECONDS)); // Last 5 seconds of data
dataStream.keyBy(0).window(TumblingTimeWindows.of(Time.of(5, TimeUnit.SECONDS))); // Last 5 seconds of data
{% endhighlight %}
</p>
</td>
......@@ -941,7 +941,7 @@ keyedStream.maxBy("key")
key according to some characteristic (e.g., the data that arrived within the last 5 seconds).
See <a href="#windows">windows</a> for a description of windows.
{% highlight scala %}
dataStream.keyBy(0).window(TumblingTimeWindows.of(5, TimeUnit.SECONDS)) // Last 5 seconds of data // Last 5 seconds of data
dataStream.keyBy(0).window(TumblingTimeWindows.of(Time.of(5, TimeUnit.SECONDS))) // Last 5 seconds of data
{% endhighlight %}
</p>
</td>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册