Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
710c08b8
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,发现更多精彩内容 >>
提交
710c08b8
编写于
5月 05, 2017
作者:
S
Stephan Ewen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[hotfix] [runtime] Migrate NetworkEnvironmentConfiguration to Java
上级
606c5920
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
209 addition
and
39 deletion
+209
-39
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
...pache/flink/runtime/taskexecutor/TaskManagerServices.java
+1
-1
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
.../runtime/taskmanager/NetworkEnvironmentConfiguration.java
+206
-0
flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.scala
...runtime/taskmanager/NetworkEnvironmentConfiguration.scala
+0
-36
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerComponentsStartupShutdownTest.java
...taskmanager/TaskManagerComponentsStartupShutdownTest.java
+1
-1
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerTest.java
...org/apache/flink/runtime/taskmanager/TaskManagerTest.java
+1
-1
未找到文件。
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
浏览文件 @
710c08b8
...
...
@@ -388,7 +388,7 @@ public class TaskManagerServices {
networkEnvironmentConfiguration
.
partitionRequestInitialBackoff
(),
networkEnvironmentConfiguration
.
partitionRequestMaxBackoff
(),
networkEnvironmentConfiguration
.
networkBuffersPerChannel
(),
networkEnvironmentConfiguration
.
extra
NetworkBuffersPerGate
());
networkEnvironmentConfiguration
.
floating
NetworkBuffersPerGate
());
}
/**
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
0 → 100644
浏览文件 @
710c08b8
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.apache.flink.runtime.taskmanager
;
import
org.apache.flink.core.memory.MemoryType
;
import
org.apache.flink.runtime.io.disk.iomanager.IOManager.IOMode
;
import
org.apache.flink.runtime.io.network.netty.NettyConfig
;
import
javax.annotation.Nullable
;
/**
* Configuration object for the network stack.
*/
public
class
NetworkEnvironmentConfiguration
{
private
final
float
networkBufFraction
;
private
final
long
networkBufMin
;
private
final
long
networkBufMax
;
private
final
int
networkBufferSize
;
private
final
MemoryType
memoryType
;
private
final
IOMode
ioMode
;
private
final
int
partitionRequestInitialBackoff
;
private
final
int
partitionRequestMaxBackoff
;
private
final
int
networkBuffersPerChannel
;
private
final
int
floatingNetworkBuffersPerGate
;
private
final
NettyConfig
nettyConfig
;
/**
* Constructor for a setup with purely local communication (no netty).
*/
public
NetworkEnvironmentConfiguration
(
float
networkBufFraction
,
long
networkBufMin
,
long
networkBufMax
,
int
networkBufferSize
,
MemoryType
memoryType
,
IOMode
ioMode
,
int
partitionRequestInitialBackoff
,
int
partitionRequestMaxBackoff
,
int
networkBuffersPerChannel
,
int
floatingNetworkBuffersPerGate
)
{
this
(
networkBufFraction
,
networkBufMin
,
networkBufMax
,
networkBufferSize
,
memoryType
,
ioMode
,
partitionRequestInitialBackoff
,
partitionRequestMaxBackoff
,
networkBuffersPerChannel
,
floatingNetworkBuffersPerGate
,
null
);
}
public
NetworkEnvironmentConfiguration
(
float
networkBufFraction
,
long
networkBufMin
,
long
networkBufMax
,
int
networkBufferSize
,
MemoryType
memoryType
,
IOMode
ioMode
,
int
partitionRequestInitialBackoff
,
int
partitionRequestMaxBackoff
,
int
networkBuffersPerChannel
,
int
floatingNetworkBuffersPerGate
,
@Nullable
NettyConfig
nettyConfig
)
{
this
.
networkBufFraction
=
networkBufFraction
;
this
.
networkBufMin
=
networkBufMin
;
this
.
networkBufMax
=
networkBufMax
;
this
.
networkBufferSize
=
networkBufferSize
;
this
.
memoryType
=
memoryType
;
this
.
ioMode
=
ioMode
;
this
.
partitionRequestInitialBackoff
=
partitionRequestInitialBackoff
;
this
.
partitionRequestMaxBackoff
=
partitionRequestMaxBackoff
;
this
.
networkBuffersPerChannel
=
networkBuffersPerChannel
;
this
.
floatingNetworkBuffersPerGate
=
floatingNetworkBuffersPerGate
;
this
.
nettyConfig
=
nettyConfig
;
}
// ------------------------------------------------------------------------
public
float
networkBufFraction
()
{
return
networkBufFraction
;
}
public
long
networkBufMin
()
{
return
networkBufMin
;
}
public
long
networkBufMax
()
{
return
networkBufMax
;
}
public
int
networkBufferSize
()
{
return
networkBufferSize
;
}
public
MemoryType
memoryType
()
{
return
memoryType
;
}
public
IOMode
ioMode
()
{
return
ioMode
;
}
public
int
partitionRequestInitialBackoff
()
{
return
partitionRequestInitialBackoff
;
}
public
int
partitionRequestMaxBackoff
()
{
return
partitionRequestMaxBackoff
;
}
public
int
networkBuffersPerChannel
()
{
return
networkBuffersPerChannel
;
}
public
int
floatingNetworkBuffersPerGate
()
{
return
floatingNetworkBuffersPerGate
;
}
public
NettyConfig
nettyConfig
()
{
return
nettyConfig
;
}
// ------------------------------------------------------------------------
@Override
public
int
hashCode
()
{
int
result
=
1
;
result
=
31
*
result
+
networkBufferSize
;
result
=
31
*
result
+
memoryType
.
hashCode
();
result
=
31
*
result
+
ioMode
.
hashCode
();
result
=
31
*
result
+
partitionRequestInitialBackoff
;
result
=
31
*
result
+
partitionRequestMaxBackoff
;
result
=
31
*
result
+
networkBuffersPerChannel
;
result
=
31
*
result
+
floatingNetworkBuffersPerGate
;
result
=
31
*
result
+
(
nettyConfig
!=
null
?
nettyConfig
.
hashCode
()
:
0
);
return
result
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
else
if
(
obj
==
null
||
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
else
{
final
NetworkEnvironmentConfiguration
that
=
(
NetworkEnvironmentConfiguration
)
obj
;
return
this
.
networkBufFraction
==
that
.
networkBufFraction
&&
this
.
networkBufMin
==
that
.
networkBufMin
&&
this
.
networkBufMax
==
that
.
networkBufMax
&&
this
.
networkBufferSize
==
that
.
networkBufferSize
&&
this
.
partitionRequestInitialBackoff
==
that
.
partitionRequestInitialBackoff
&&
this
.
partitionRequestMaxBackoff
==
that
.
partitionRequestMaxBackoff
&&
this
.
networkBuffersPerChannel
==
that
.
networkBuffersPerChannel
&&
this
.
floatingNetworkBuffersPerGate
==
that
.
floatingNetworkBuffersPerGate
&&
this
.
memoryType
==
that
.
memoryType
&&
this
.
ioMode
==
that
.
ioMode
&&
(
nettyConfig
!=
null
?
nettyConfig
.
equals
(
that
.
nettyConfig
)
:
that
.
nettyConfig
==
null
);
}
}
@Override
public
String
toString
()
{
return
"NetworkEnvironmentConfiguration{"
+
"networkBufFraction="
+
networkBufFraction
+
", networkBufMin="
+
networkBufMin
+
", networkBufMax="
+
networkBufMax
+
", networkBufferSize="
+
networkBufferSize
+
", memoryType="
+
memoryType
+
", ioMode="
+
ioMode
+
", partitionRequestInitialBackoff="
+
partitionRequestInitialBackoff
+
", partitionRequestMaxBackoff="
+
partitionRequestMaxBackoff
+
", networkBuffersPerChannel="
+
networkBuffersPerChannel
+
", floatingNetworkBuffersPerGate="
+
floatingNetworkBuffersPerGate
+
", nettyConfig="
+
nettyConfig
+
'}'
;
}
}
flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.scala
已删除
100644 → 0
浏览文件 @
606c5920
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.apache.flink.runtime.taskmanager
import
org.apache.flink.core.memory.MemoryType
import
org.apache.flink.runtime.io.disk.iomanager.IOManager.IOMode
import
org.apache.flink.runtime.io.network.netty.NettyConfig
case
class
NetworkEnvironmentConfiguration
(
networkBufFraction
:
Float
,
networkBufMin
:
Long
,
networkBufMax
:
Long
,
networkBufferSize
:
Int
,
memoryType
:
MemoryType
,
ioMode
:
IOMode
,
partitionRequestInitialBackoff
:
Int
,
partitionRequestMaxBackoff
:
Int
,
networkBuffersPerChannel
:
Int
,
extraNetworkBuffersPerGate
:
Int
,
nettyConfig
:
NettyConfig
=
null
)
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerComponentsStartupShutdownTest.java
浏览文件 @
710c08b8
...
...
@@ -145,7 +145,7 @@ public class TaskManagerComponentsStartupShutdownTest extends TestLogger {
netConf
.
partitionRequestInitialBackoff
(),
netConf
.
partitionRequestMaxBackoff
(),
netConf
.
networkBuffersPerChannel
(),
netConf
.
extra
NetworkBuffersPerGate
());
netConf
.
floating
NetworkBuffersPerGate
());
network
.
start
();
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerTest.java
浏览文件 @
710c08b8
...
...
@@ -1047,7 +1047,7 @@ public class TaskManagerTest extends TestLogger {
assertEquals
(
tmConfig
.
getNetworkConfig
().
partitionRequestInitialBackoff
(),
100
);
assertEquals
(
tmConfig
.
getNetworkConfig
().
partitionRequestMaxBackoff
(),
200
);
assertEquals
(
tmConfig
.
getNetworkConfig
().
networkBuffersPerChannel
(),
10
);
assertEquals
(
tmConfig
.
getNetworkConfig
().
extra
NetworkBuffersPerGate
(),
100
);
assertEquals
(
tmConfig
.
getNetworkConfig
().
floating
NetworkBuffersPerGate
(),
100
);
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录