提交 dcce6def 编写于 作者: R Robert Metzger 提交者: Fabian Hueske

[docs][hotfix] Fix wrong window definitions in the docs

This closes #1407
上级 804611ce
......@@ -2519,7 +2519,7 @@ implementing the `Evictor` interface.
until end-value are retained (the resulting window size is 1 second).
</p>
{% highlight java %}
triggeredStream.evict(TimeEvictor.of(Time.of(1, TimeUnit.SECONDS)));
triggeredStream.evictor(TimeEvictor.of(Time.of(1, TimeUnit.SECONDS)));
{% endhighlight %}
</td>
</tr>
......@@ -2530,7 +2530,7 @@ triggeredStream.evict(TimeEvictor.of(Time.of(1, TimeUnit.SECONDS)));
Retain 1000 elements from the end of the window backwards, evicting all others.
</p>
{% highlight java %}
triggeredStream.evict(CountEvictor.of(1000));
triggeredStream.evictor(CountEvictor.of(1000));
{% endhighlight %}
</td>
</tr>
......@@ -2543,7 +2543,7 @@ triggeredStream.evict(CountEvictor.of(1000));
DeltaFunction).
</p>
{% highlight java %}
triggeredStream.evict(DeltaEvictor.of(5000, new DeltaFunction<Double>() {
triggeredStream.evictor(DeltaEvictor.of(5000, new DeltaFunction<Double>() {
public double (Double oldValue, Double newValue) {
return newValue - oldValue;
}
......@@ -2572,7 +2572,7 @@ triggeredStream.evict(DeltaEvictor.of(5000, new DeltaFunction<Double>() {
until end-value are retained (the resulting window size is 1 second).
</p>
{% highlight scala %}
triggeredStream.evict(TimeEvictor.of(Time.of(1, TimeUnit.SECONDS)));
triggeredStream.evictor(TimeEvictor.of(Time.of(1, TimeUnit.SECONDS)));
{% endhighlight %}
</td>
</tr>
......@@ -2583,7 +2583,7 @@ triggeredStream.evict(TimeEvictor.of(Time.of(1, TimeUnit.SECONDS)));
Retain 1000 elements from the end of the window backwards, evicting all others.
</p>
{% highlight scala %}
triggeredStream.evict(CountEvictor.of(1000));
triggeredStream.evictor(CountEvictor.of(1000));
{% endhighlight %}
</td>
</tr>
......@@ -2596,7 +2596,7 @@ triggeredStream.evict(CountEvictor.of(1000));
DeltaFunction).
</p>
{% highlight scala %}
windowedStream.evict(DeltaEvictor.of(5000.0, { (old,new) => new - old > 0.01 }))
windowedStream.evictor(DeltaEvictor.of(5000.0, { (old,new) => new - old > 0.01 }))
{% endhighlight %}
</td>
</tr>
......@@ -2632,7 +2632,7 @@ stream.countWindow(1000)
{% highlight java %}
stream.window(GlobalWindows.create())
.trigger(CountTrigger.of(1000)
.evict(CountEvictor.of(1000)))
.evictor(CountEvictor.of(1000)))
{% endhighlight %}
</td>
</tr>
......@@ -2646,8 +2646,8 @@ stream.countWindow(1000, 100)
<td>
{% highlight java %}
stream.window(GlobalWindows.create())
.trigger(CountTrigger.of(1000)
.evict(CountEvictor.of(100)))
.evictor(CountEvictor.of(1000))
.trigger(CountTrigger.of(100))
{% endhighlight %}
</td>
</tr>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册