Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
687cc919
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,发现更多精彩内容 >>
未验证
提交
687cc919
编写于
6月 17, 2019
作者:
A
Andrey Zagrebin
提交者:
Till Rohrmann
6月 20, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[hotfix][network] Rename taskExecutorLocation to taskExecutorResourceId and small fixes
上级
7d8869d7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
18 deletion
+19
-18
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NettyShuffleEnvironment.java
...che/flink/runtime/io/network/NettyShuffleEnvironment.java
+10
-9
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionFactory.java
.../runtime/io/network/partition/ResultPartitionFactory.java
+1
-1
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateFactory.java
...io/network/partition/consumer/SingleInputGateFactory.java
+8
-8
未找到文件。
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NettyShuffleEnvironment.java
浏览文件 @
687cc919
...
...
@@ -87,7 +87,7 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
private
final
Object
lock
=
new
Object
();
private
final
ResourceID
taskExecutor
Location
;
private
final
ResourceID
taskExecutor
ResourceId
;
private
final
NettyShuffleEnvironmentConfiguration
config
;
...
...
@@ -106,19 +106,19 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
private
boolean
isClosed
;
private
NettyShuffleEnvironment
(
ResourceID
taskExecutor
Location
,
ResourceID
taskExecutor
ResourceId
,
NettyShuffleEnvironmentConfiguration
config
,
NetworkBufferPool
networkBufferPool
,
ConnectionManager
connectionManager
,
ResultPartitionManager
resultPartitionManager
,
ResultPartitionFactory
resultPartitionFactory
,
SingleInputGateFactory
singleInputGateFactory
)
{
this
.
taskExecutor
Location
=
taskExecutorLocation
;
this
.
taskExecutor
ResourceId
=
taskExecutorResourceId
;
this
.
config
=
config
;
this
.
networkBufferPool
=
networkBufferPool
;
this
.
connectionManager
=
connectionManager
;
this
.
resultPartitionManager
=
resultPartitionManager
;
this
.
inputGatesById
=
new
ConcurrentHashMap
<>();
this
.
inputGatesById
=
new
ConcurrentHashMap
<>(
10
);
this
.
resultPartitionFactory
=
resultPartitionFactory
;
this
.
singleInputGateFactory
=
singleInputGateFactory
;
this
.
isClosed
=
false
;
...
...
@@ -126,11 +126,11 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
public
static
NettyShuffleEnvironment
create
(
NettyShuffleEnvironmentConfiguration
config
,
ResourceID
taskExecutor
Location
,
ResourceID
taskExecutor
ResourceId
,
TaskEventPublisher
taskEventPublisher
,
MetricGroup
metricGroup
,
IOManager
ioManager
)
{
checkNotNull
(
taskExecutor
Location
);
checkNotNull
(
taskExecutor
ResourceId
);
checkNotNull
(
ioManager
);
checkNotNull
(
taskEventPublisher
);
checkNotNull
(
config
);
...
...
@@ -159,7 +159,7 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
config
.
isForcePartitionReleaseOnConsumption
());
SingleInputGateFactory
singleInputGateFactory
=
new
SingleInputGateFactory
(
taskExecutor
Location
,
taskExecutor
ResourceId
,
config
,
connectionManager
,
resultPartitionManager
,
...
...
@@ -167,7 +167,7 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
networkBufferPool
);
return
new
NettyShuffleEnvironment
(
taskExecutor
Location
,
taskExecutor
ResourceId
,
config
,
networkBufferPool
,
connectionManager
,
...
...
@@ -320,7 +320,7 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
checkArgument
(
shuffleDescriptor
instanceof
NettyShuffleDescriptor
,
"Tried to update unknown channel with unknown ShuffleDescriptor %s."
,
shuffleDescriptor
.
getClass
().
getName
());
inputGate
.
updateInputChannel
(
taskExecutor
Location
,
(
NettyShuffleDescriptor
)
shuffleDescriptor
);
inputGate
.
updateInputChannel
(
taskExecutor
ResourceId
,
(
NettyShuffleDescriptor
)
shuffleDescriptor
);
return
true
;
}
...
...
@@ -358,6 +358,7 @@ public class NettyShuffleEnvironment implements ShuffleEnvironment<ResultPartiti
LOG
.
info
(
"Shutting down the network environment and its components."
);
// terminate all network connections
//noinspection OverlyBroadCatchBlock
try
{
LOG
.
debug
(
"Shutting down network connection manager"
);
connectionManager
.
shutdown
();
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionFactory.java
浏览文件 @
687cc919
...
...
@@ -42,7 +42,7 @@ import java.util.Optional;
* Factory for {@link ResultPartition} to use in {@link NettyShuffleEnvironment}.
*/
public
class
ResultPartitionFactory
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
ResultPartition
.
class
);
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
ResultPartition
Factory
.
class
);
@Nonnull
private
final
ResultPartitionManager
partitionManager
;
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateFactory.java
浏览文件 @
687cc919
...
...
@@ -50,10 +50,10 @@ import static org.apache.flink.runtime.shuffle.ShuffleUtils.applyWithShuffleType
* Factory for {@link SingleInputGate} to use in {@link NettyShuffleEnvironment}.
*/
public
class
SingleInputGateFactory
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
SingleInputGate
.
class
);
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
SingleInputGate
Factory
.
class
);
@Nonnull
private
final
ResourceID
taskExecutor
Location
;
private
final
ResourceID
taskExecutor
ResourceId
;
private
final
boolean
isCreditBased
;
...
...
@@ -78,13 +78,13 @@ public class SingleInputGateFactory {
private
final
int
floatingNetworkBuffersPerGate
;
public
SingleInputGateFactory
(
@Nonnull
ResourceID
taskExecutor
Location
,
@Nonnull
ResourceID
taskExecutor
ResourceId
,
@Nonnull
NettyShuffleEnvironmentConfiguration
networkConfig
,
@Nonnull
ConnectionManager
connectionManager
,
@Nonnull
ResultPartitionManager
partitionManager
,
@Nonnull
TaskEventPublisher
taskEventPublisher
,
@Nonnull
NetworkBufferPool
networkBufferPool
)
{
this
.
taskExecutor
Location
=
taskExecutorLocation
;
this
.
taskExecutor
ResourceId
=
taskExecutorResourceId
;
this
.
isCreditBased
=
networkConfig
.
isCreditBased
();
this
.
partitionRequestInitialBackoff
=
networkConfig
.
partitionRequestInitialBackoff
();
this
.
partitionRequestMaxBackoff
=
networkConfig
.
partitionRequestMaxBackoff
();
...
...
@@ -194,7 +194,7 @@ public class SingleInputGateFactory {
ChannelStatistics
channelStatistics
,
InputChannelMetrics
metrics
)
{
ResultPartitionID
partitionId
=
inputChannelDescriptor
.
getResultPartitionID
();
if
(
inputChannelDescriptor
.
isLocalTo
(
taskExecutor
Location
))
{
if
(
inputChannelDescriptor
.
isLocalTo
(
taskExecutor
ResourceId
))
{
// Consuming task is deployed to the same TaskManager as the partition => local
channelStatistics
.
numLocalChannels
++;
return
new
LocalInputChannel
(
...
...
@@ -241,9 +241,9 @@ public class SingleInputGateFactory {
}
private
static
class
ChannelStatistics
{
int
numLocalChannels
=
0
;
int
numRemoteChannels
=
0
;
int
numUnknownChannels
=
0
;
int
numLocalChannels
;
int
numRemoteChannels
;
int
numUnknownChannels
;
@Override
public
String
toString
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录