Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
345de772
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
345de772
编写于
9月 07, 2017
作者:
M
Mikhail Lipkovich
提交者:
Aljoscha Krettek
9月 22, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-7567] [scala] Remove keepPartitioning parameter from DataStream.iterate()
上级
42cc3a2a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
7 deletion
+11
-7
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/FeedbackTransformation.java
...streaming/api/transformations/FeedbackTransformation.java
+2
-1
flink-streaming-scala/pom.xml
flink-streaming-scala/pom.xml
+4
-0
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStream.scala
...ala/org/apache/flink/streaming/api/scala/DataStream.scala
+5
-6
未找到文件。
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/FeedbackTransformation.java
浏览文件 @
345de772
...
...
@@ -87,7 +87,8 @@ public class FeedbackTransformation<T> extends StreamTransformation<T> {
throw
new
UnsupportedOperationException
(
"Parallelism of the feedback stream must match the parallelism of the original"
+
" stream. Parallelism of original stream: "
+
this
.
getParallelism
()
+
"; parallelism of feedback stream: "
+
transform
.
getParallelism
());
"; parallelism of feedback stream: "
+
transform
.
getParallelism
()
+
". Parallelism can be modified using DataStream#setParallelism() method"
);
}
feedbackEdges
.
add
(
transform
);
...
...
flink-streaming-scala/pom.xml
浏览文件 @
345de772
...
...
@@ -228,6 +228,10 @@ under the License.
<excludes
combine.children=
"append"
>
<!-- Exclude generated classes from api compatibility checks -->
<exclude>
*\$\$anon\$*
</exclude>
<!-- Ignore method which was created automatically by Scala for default value calculation.
Can be removed once https://github.com/siom79/japicmp/issues/176 will be fixed -->
<exclude>
org.apache.flink.streaming.api.scala.DataStream#iterate\$default\$3()
</exclude>
</excludes>
</parameter>
</configuration>
...
...
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStream.scala
浏览文件 @
345de772
...
...
@@ -499,23 +499,22 @@ class DataStream[T](stream: JavaStream[T]) {
* stepfunction: initialStream => (feedback, output)
*
* A common pattern is to use output splitting to create feedback and output DataStream.
* Please refer to the
.split(...)
method of the DataStream
* Please refer to the
[[split]]
method of the DataStream
*
* By default a DataStream with iteration will never terminate, but the user
* can use the maxWaitTime parameter to set a max waiting time for the iteration head.
* If no data received in the set time the stream terminates.
*
* By default the feedback partitioning is set to match the input, to override this set
* the keepPartitioning flag to true
*
* Parallelism of the feedback stream must match the parallelism of the original stream.
* Please refer to the [[setParallelism]] method for parallelism modification
*/
@PublicEvolving
def
iterate
[
R
](
stepFunction
:
DataStream
[
T
]
=>
(
DataStream
[
T
],
DataStream
[
R
]),
maxWaitTimeMillis
:
Long
=
0
,
keepPartitioning
:
Boolean
=
false
)
:
DataStream
[
R
]
=
{
maxWaitTimeMillis
:
Long
=
0
)
:
DataStream
[
R
]
=
{
val
iterativeStream
=
stream
.
iterate
(
maxWaitTimeMillis
)
val
(
feedback
,
output
)
=
stepFunction
(
new
DataStream
[
T
](
iterativeStream
))
iterativeStream
.
closeWith
(
feedback
.
javaStream
)
output
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录