azagrebin commented on a change in pull request #8090: [FLINK-12067][network]
Refactor the constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8090#discussion_r271833815
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/NetworkBufferCalculationTest.java
##########
@@ -39,78 +33,66 @@
public class NetworkBufferCalculationTest extends TestLogger {
/**
- * Test for {@link
TaskManagerServices#calculateNetworkBufferMemory(TaskManagerServicesConfiguration,
long)}
- * using the same (manual) test cases as in {@link
TaskManagerServicesTest#calculateHeapSizeMB()}.
+ * Test for {@link
NetworkEnvironmentConfiguration#calculateNewNetworkBufferMemory(Configuration,
long)}
+ * using the same (manual) test cases as in {@link
NetworkEnvironmentConfigurationTest#calculateHeapSizeMB()}.
*/
@Test
- public void calculateNetworkBufFromHeapSize() throws Exception {
- TaskManagerServicesConfiguration tmConfig;
+ public void calculateNetworkBufFromHeapSize() {
+ Configuration config;
- tmConfig =
getTmConfig(Long.valueOf(TaskManagerOptions.MANAGED_MEMORY_SIZE.defaultValue()),
+ config = getConfig(
+
Long.valueOf(TaskManagerOptions.MANAGED_MEMORY_SIZE.defaultValue()),
TaskManagerOptions.MANAGED_MEMORY_FRACTION.defaultValue(),
- 0.1f, 60L << 20, 1L << 30, MemoryType.HEAP);
+ 0.1f, 60L << 20, 1L << 30, false);
Review comment:
MemoryType.HEAP/OFF_HEAP looked a bit more readable.
could we use `memType == MemoryType.OFF_HEAP` in `getConfig(.., memType)`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services