zhijiangW commented on a change in pull request #8191: [FLINK-12213][network]
Pass TaskManagerMetricGroup into constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8191#discussion_r276580234
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/state/TaskExecutorLocalStateStoresManagerTest.java
##########
@@ -105,21 +96,11 @@ public void testCreationFromConfigDefault() throws
Exception {
final Configuration config = new Configuration();
- final ResourceID tmResourceID = ResourceID.generate();
-
- TaskManagerServicesConfiguration
taskManagerServicesConfiguration =
-
TaskManagerServicesConfiguration.fromConfiguration(config, MEM_SIZE_PARAM,
InetAddress.getLocalHost(), true);
-
- TaskManagerServices taskManagerServices =
TaskManagerServices.fromConfiguration(
- taskManagerServicesConfiguration,
- tmResourceID,
- Executors.directExecutor(),
- MEM_SIZE_PARAM,
- MEM_SIZE_PARAM);
+ TaskManagerServices taskManagerServices =
createTaskManagerServices(config);
TaskExecutorLocalStateStoresManager taskStateManager =
taskManagerServices.getTaskManagerStateStore();
- String[] tmpDirPaths =
taskManagerServicesConfiguration.getTmpDirPaths();
+ String[] tmpDirPaths =
ConfigurationUtils.parseTempDirectories(config);
Review comment:
In order to reuse the `TaskManagerServicesConfiguration` in
`createTaskManagerServices`, otherwise the creation of
`TaskManagerServicesConfiguration` has to be outside of
`createTaskManagerServices`.
Comparing with reuse the creation of `TaskManagerServicesConfiguration`, I
think it is cheaper to use `ConfigurationUtils.parseTempDirectories(config)`
instead here.
----------------------------------------------------------------
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