use of org.apache.flink.runtime.blob.TaskExecutorBlobService in project flink by apache.
the class TaskExecutorBuilder method build.
public TaskExecutor build() throws Exception {
final TaskExecutorBlobService resolvedTaskExecutorBlobService;
TaskExecutorResourceUtils.adjustForLocalExecution(configuration);
if (taskExecutorBlobService == null) {
resolvedTaskExecutorBlobService = NoOpTaskExecutorBlobService.INSTANCE;
} else {
resolvedTaskExecutorBlobService = taskExecutorBlobService;
}
final TaskManagerConfiguration resolvedTaskManagerConfiguration;
if (taskManagerConfiguration == null) {
resolvedTaskManagerConfiguration = TaskManagerConfiguration.fromConfiguration(configuration, taskExecutorResourceSpec, rpcService.getAddress(), workingDirectory.getTmpDirectory());
} else {
resolvedTaskManagerConfiguration = taskManagerConfiguration;
}
final TaskManagerServices resolvedTaskManagerServices;
if (taskManagerServices == null) {
final TaskManagerServicesConfiguration taskManagerServicesConfiguration = TaskManagerServicesConfiguration.fromConfiguration(configuration, resourceId, rpcService.getAddress(), true, taskExecutorResourceSpec, workingDirectory);
resolvedTaskManagerServices = TaskManagerServices.fromConfiguration(taskManagerServicesConfiguration, VoidPermanentBlobService.INSTANCE, UnregisteredMetricGroups.createUnregisteredTaskManagerMetricGroup(), Executors.newDirectExecutorService(), throwable -> {
}, workingDirectory);
} else {
resolvedTaskManagerServices = taskManagerServices;
}
return new TaskExecutor(rpcService, resolvedTaskManagerConfiguration, haServices, resolvedTaskManagerServices, externalResourceInfoProvider, heartbeatServices, taskManagerMetricGroup, metricQueryServiceAddress, resolvedTaskExecutorBlobService, fatalErrorHandler, partitionTracker);
}
Aggregations