[
https://issues.apache.org/jira/browse/FLINK-10301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16610294#comment-16610294
]
ASF GitHub Bot commented on FLINK-10301:
----------------------------------------
zhijiangW commented on a change in pull request #6670: [FLINK-10301][network]
extend StreamNetworkBenchmarkEnvironment to allow custom Configuration instances
URL: https://github.com/apache/flink/pull/6670#discussion_r216565959
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/benchmark/StreamNetworkBenchmarkEnvironment.java
##########
@@ -179,12 +192,15 @@ private void generatePartitionIds() throws Exception {
}
private NetworkEnvironment createNettyNetworkEnvironment(
- @SuppressWarnings("SameParameterValue") int
bufferPoolSize) throws Exception {
+ @SuppressWarnings("SameParameterValue") int
bufferPoolSize, Configuration config) throws Exception {
+
+ int segmentSize =
+
checkedDownCast(MemorySize.parse(config.getString(TaskManagerOptions.MEMORY_SEGMENT_SIZE)).getBytes());
- final NetworkBufferPool bufferPool = new
NetworkBufferPool(bufferPoolSize, BUFFER_SIZE);
+ final NetworkBufferPool bufferPool = new
NetworkBufferPool(bufferPoolSize, segmentSize);
final NettyConnectionManager nettyConnectionManager = new
NettyConnectionManager(
- new NettyConfig(LOCAL_ADDRESS, 0, BUFFER_SIZE,
NUM_SLOTS_AND_THREADS, new Configuration()));
Review comment:
Do we also need get the value of `NUM_SLOTS_AND_THREADS` from this `config`?
I know the current usages of `NUM_SLOTS_AND_THREADS` are only for
`NUM_ARENAS` and `NUM_THREADS_SERVER` which both have separate parameters in
`NettyConfig`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Allow a custom Configuration in StreamNetworkBenchmarkEnvironment
> -----------------------------------------------------------------
>
> Key: FLINK-10301
> URL: https://issues.apache.org/jira/browse/FLINK-10301
> Project: Flink
> Issue Type: Improvement
> Components: Network, Tests
> Affects Versions: 1.7.0
> Reporter: Nico Kruber
> Assignee: Nico Kruber
> Priority: Major
> Labels: pull-request-available
>
> {{StreamNetworkBenchmarkEnvironment}} currently instantiates its
> {{NettyConfig}} with {{new Configuration()}} but for testing with different
> options, it would be nice to allow the user to provide a custom instance
> instead.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)