Source:
public TaskExecutor( RpcService rpcService, TaskManagerConfiguration taskManagerConfiguration, HighAvailabilityServices haServices, TaskManagerServices taskExecutorServices, HeartbeatServices heartbeatServices, TaskManagerMetricGroup taskManagerMetricGroup, String metricQueryServiceAddress, BlobCacheService blobCacheService, FatalErrorHandler fatalErrorHandler, TaskExecutorPartitionTracker partitionTracker, BackPressureSampleService backPressureSampleService) { super(rpcService, AkkaRpcServiceUtils.createRandomName(TASK_MANAGER_NAME)); checkArgument(taskManagerConfiguration.getNumberSlots() > 0, "The number of slots has to be larger than 0."); this.taskManagerConfiguration = checkNotNull(taskManagerConfiguration); this.taskExecutorServices = checkNotNull(taskExecutorServices); this.haServices = checkNotNull(haServices); this.fatalErrorHandler = checkNotNull(fatalErrorHandler); this.partitionTracker = partitionTracker; this.taskManagerMetricGroup = checkNotNull(taskManagerMetricGroup); this.blobCacheService = checkNotNull(blobCacheService); this.metricQueryServiceAddress = checkNotNull(metricQueryServiceAddress); this.backPressureSampleService = checkNotNull(backPressureSampleService); this.taskSlotTable = taskExecutorServices.getTaskSlotTable(); this.jobManagerTable = taskExecutorServices.getJobManagerTable(); this.jobLeaderService = taskExecutorServices.getJobLeaderService(); this.unresolvedTaskManagerLocation = taskExecutorServices.getUnresolvedTaskManagerLocation(); this.localStateStoresManager = taskExecutorServices.getTaskManagerStateStore(); this.shuffleEnvironment = taskExecutorServices.getShuffleEnvironment(); this.kvStateService = taskExecutorServices.getKvStateService(); this.resourceManagerLeaderRetriever = haServices.getResourceManagerLeaderRetriever(); this.jobManagerConnections = new HashMap<>(4); this.hardwareDescription = HardwareDescription.extractFromSystem(taskExecutorServices.getManagedMemorySize()); this.resourceManagerAddress = null; this.resourceManagerConnection = null; this.currentRegistrationTimeoutId = null; final ResourceID resourceId = taskExecutorServices.getUnresolvedTaskManagerLocation().getResourceID(); this.jobManagerHeartbeatManager = createJobManagerHeartbeatManager(heartbeatServices, resourceId); this.resourceManagerHeartbeatManager = createResourceManagerHeartbeatManager(heartbeatServices, resourceId); this.ioExecutor = Executors.newSingleThreadExecutor(new ExecutorThreadFactory("taskexecutor-io")); }

Target:
public TaskExecutor( RpcService rpcService, TaskManagerConfiguration taskManagerConfiguration, HighAvailabilityServices haServices, TaskManagerServices taskExecutorServices, HeartbeatServices heartbeatServices, TaskManagerMetricGroup taskManagerMetricGroup, String metricQueryServiceAddress, BlobCacheService blobCacheService, FatalErrorHandler fatalErrorHandler, TaskExecutorPartitionTracker partitionTracker, BackPressureSampleService backPressureSampleService) { super(rpcService, AkkaRpcServiceUtils.createRandomName(TASK_MANAGER_NAME)); checkArgument(taskManagerConfiguration.getNumberSlots() > 0, "The number of slots has to be larger than 0."); this.taskManagerConfiguration = checkNotNull(taskManagerConfiguration); this.taskExecutorServices = checkNotNull(taskExecutorServices); this.haServices = checkNotNull(haServices); this.fatalErrorHandler = checkNotNull(fatalErrorHandler); this.partitionTracker = partitionTracker; this.taskManagerMetricGroup = checkNotNull(taskManagerMetricGroup); this.blobCacheService = checkNotNull(blobCacheService); this.metricQueryServiceAddress = checkNotNull(metricQueryServiceAddress); this.backPressureSampleService = checkNotNull(backPressureSampleService); this.taskSlotTable = taskExecutorServices.getTaskSlotTable(); this.jobManagerTable = taskExecutorServices.getJobManagerTable(); this.jobLeaderService = taskExecutorServices.getJobLeaderService(); this.unresolvedTaskManagerLocation = taskExecutorServices.getUnresolvedTaskManagerLocation(); this.localStateStoresManager = taskExecutorServices.getTaskManagerStateStore(); this.shuffleEnvironment = taskExecutorServices.getShuffleEnvironment(); this.kvStateService = taskExecutorServices.getKvStateService(); this.ioExecutor = taskExecutorServices.getIOExecutor(); this.resourceManagerLeaderRetriever = haServices.getResourceManagerLeaderRetriever(); this.jobManagerConnections = new HashMap<>(4); this.hardwareDescription = HardwareDescription.extractFromSystem(taskExecutorServices.getManagedMemorySize()); this.resourceManagerAddress = null; this.resourceManagerConnection = null; this.currentRegistrationTimeoutId = null; final ResourceID resourceId = taskExecutorServices.getUnresolvedTaskManagerLocation().getResourceID(); this.jobManagerHeartbeatManager = createJobManagerHeartbeatManager(heartbeatServices, resourceId); this.resourceManagerHeartbeatManager = createResourceManagerHeartbeatManager(heartbeatServices, resourceId); }