org.apache.flink.runtime.taskexecutor.TaskExecutor Java Examples

The following examples show how to use org.apache.flink.runtime.taskexecutor.TaskExecutor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MiniCluster.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
void startTaskExecutor() throws Exception {
	synchronized (lock) {
		final Configuration configuration = miniClusterConfiguration.getConfiguration();

		final TaskExecutor taskExecutor = TaskManagerRunner.startTaskManager(
			configuration,
			new ResourceID(UUID.randomUUID().toString()),
			taskManagerRpcServiceFactory.createRpcService(),
			haServices,
			heartbeatServices,
			metricRegistry,
			blobCacheService,
			useLocalCommunication(),
			taskManagerTerminatingFatalErrorHandlerFactory.create(taskManagers.size()));

		taskExecutor.start();
		taskManagers.add(taskExecutor);
	}
}
 
Example #2
Source File: MiniCluster.java    From flink with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
void startTaskExecutor() throws Exception {
	synchronized (lock) {
		final Configuration configuration = miniClusterConfiguration.getConfiguration();

		final TaskExecutor taskExecutor = TaskManagerRunner.startTaskManager(
			configuration,
			new ResourceID(UUID.randomUUID().toString()),
			taskManagerRpcServiceFactory.createRpcService(),
			haServices,
			heartbeatServices,
			metricRegistry,
			blobCacheService,
			useLocalCommunication(),
			taskManagerTerminatingFatalErrorHandlerFactory.create(taskManagers.size()));

		taskExecutor.start();
		taskManagers.add(taskExecutor);
	}
}
 
Example #3
Source File: MiniCluster.java    From flink with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
void startTaskExecutor() throws Exception {
	synchronized (lock) {
		final Configuration configuration = miniClusterConfiguration.getConfiguration();

		final TaskExecutor taskExecutor = TaskManagerRunner.startTaskManager(
			configuration,
			new ResourceID(UUID.randomUUID().toString()),
			taskManagerRpcServiceFactory.createRpcService(),
			haServices,
			heartbeatServices,
			metricRegistry,
			blobCacheService,
			useLocalCommunication(),
			ExternalResourceInfoProvider.NO_EXTERNAL_RESOURCES,
			taskManagerTerminatingFatalErrorHandlerFactory.create(taskManagers.size()));

		taskExecutor.start();
		taskManagers.add(taskExecutor);
	}
}
 
Example #4
Source File: MiniCluster.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
@Nonnull
protected CompletableFuture<Void> terminateTaskExecutor(int index) {
	synchronized (lock) {
		final TaskExecutor taskExecutor = taskManagers.get(index);
		return taskExecutor.closeAsync();
	}
}
 
Example #5
Source File: MiniCluster.java    From flink with Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
@Nonnull
protected CompletableFuture<Void> terminateTaskExecutor(int index) {
	synchronized (lock) {
		final TaskExecutor taskExecutor = taskManagers.get(index);
		return taskExecutor.closeAsync();
	}
}
 
Example #6
Source File: MiniCluster.java    From flink with Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
@Nonnull
protected CompletableFuture<Void> terminateTaskExecutor(int index) {
	synchronized (lock) {
		final TaskExecutor taskExecutor = taskManagers.get(index);
		return taskExecutor.closeAsync();
	}
}