Search in sources :

Example 1 with TaskExecutorBlobService

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);
}
Also used : TaskExecutorBlobService(org.apache.flink.runtime.blob.TaskExecutorBlobService) VoidPermanentBlobService(org.apache.flink.runtime.blob.VoidPermanentBlobService) HighAvailabilityServices(org.apache.flink.runtime.highavailability.HighAvailabilityServices) Configuration(org.apache.flink.configuration.Configuration) NoOpTaskExecutorBlobService(org.apache.flink.runtime.blob.NoOpTaskExecutorBlobService) TestingTaskExecutorPartitionTracker(org.apache.flink.runtime.io.network.partition.TestingTaskExecutorPartitionTracker) TaskManagerMetricGroup(org.apache.flink.runtime.metrics.groups.TaskManagerMetricGroup) MemorySize(org.apache.flink.configuration.MemorySize) HeartbeatServices(org.apache.flink.runtime.heartbeat.HeartbeatServices) Executors(org.apache.flink.util.concurrent.Executors) UnregisteredMetricGroups(org.apache.flink.runtime.metrics.groups.UnregisteredMetricGroups) RpcService(org.apache.flink.runtime.rpc.RpcService) WorkingDirectory(org.apache.flink.runtime.entrypoint.WorkingDirectory) TaskExecutorPartitionTracker(org.apache.flink.runtime.io.network.partition.TaskExecutorPartitionTracker) ExternalResourceInfoProvider(org.apache.flink.runtime.externalresource.ExternalResourceInfoProvider) FatalErrorHandler(org.apache.flink.runtime.rpc.FatalErrorHandler) BlobCacheService(org.apache.flink.runtime.blob.BlobCacheService) ResourceID(org.apache.flink.runtime.clusterframework.types.ResourceID) NoOpFatalErrorHandler(org.apache.flink.runtime.rest.util.NoOpFatalErrorHandler) Collections(java.util.Collections) Nullable(javax.annotation.Nullable) CPUResource(org.apache.flink.api.common.resources.CPUResource) TaskExecutorBlobService(org.apache.flink.runtime.blob.TaskExecutorBlobService) NoOpTaskExecutorBlobService(org.apache.flink.runtime.blob.NoOpTaskExecutorBlobService)

Aggregations

Collections (java.util.Collections)1 Nullable (javax.annotation.Nullable)1 CPUResource (org.apache.flink.api.common.resources.CPUResource)1 Configuration (org.apache.flink.configuration.Configuration)1 MemorySize (org.apache.flink.configuration.MemorySize)1 BlobCacheService (org.apache.flink.runtime.blob.BlobCacheService)1 NoOpTaskExecutorBlobService (org.apache.flink.runtime.blob.NoOpTaskExecutorBlobService)1 TaskExecutorBlobService (org.apache.flink.runtime.blob.TaskExecutorBlobService)1 VoidPermanentBlobService (org.apache.flink.runtime.blob.VoidPermanentBlobService)1 ResourceID (org.apache.flink.runtime.clusterframework.types.ResourceID)1 WorkingDirectory (org.apache.flink.runtime.entrypoint.WorkingDirectory)1 ExternalResourceInfoProvider (org.apache.flink.runtime.externalresource.ExternalResourceInfoProvider)1 HeartbeatServices (org.apache.flink.runtime.heartbeat.HeartbeatServices)1 HighAvailabilityServices (org.apache.flink.runtime.highavailability.HighAvailabilityServices)1 TaskExecutorPartitionTracker (org.apache.flink.runtime.io.network.partition.TaskExecutorPartitionTracker)1 TestingTaskExecutorPartitionTracker (org.apache.flink.runtime.io.network.partition.TestingTaskExecutorPartitionTracker)1 TaskManagerMetricGroup (org.apache.flink.runtime.metrics.groups.TaskManagerMetricGroup)1 UnregisteredMetricGroups (org.apache.flink.runtime.metrics.groups.UnregisteredMetricGroups)1 NoOpFatalErrorHandler (org.apache.flink.runtime.rest.util.NoOpFatalErrorHandler)1 FatalErrorHandler (org.apache.flink.runtime.rpc.FatalErrorHandler)1