Java Code Examples for org.apache.flink.runtime.heartbeat.HeartbeatServices#fromConfiguration()
The following examples show how to use
org.apache.flink.runtime.heartbeat.HeartbeatServices#fromConfiguration() .
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: TaskManagerRunner.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public TaskManagerRunner(Configuration configuration, ResourceID resourceId) throws Exception { this.configuration = checkNotNull(configuration); this.resourceId = checkNotNull(resourceId); timeout = AkkaUtils.getTimeoutAsTime(configuration); this.executor = java.util.concurrent.Executors.newScheduledThreadPool( Hardware.getNumberCPUCores(), new ExecutorThreadFactory("taskmanager-future")); highAvailabilityServices = HighAvailabilityServicesUtils.createHighAvailabilityServices( configuration, executor, HighAvailabilityServicesUtils.AddressResolution.TRY_ADDRESS_RESOLUTION); rpcService = createRpcService(configuration, highAvailabilityServices); metricQueryServiceActorSystem = MetricUtils.startMetricsActorSystem(configuration, rpcService.getAddress(), LOG); HeartbeatServices heartbeatServices = HeartbeatServices.fromConfiguration(configuration); metricRegistry = new MetricRegistryImpl(MetricRegistryConfiguration.fromConfiguration(configuration)); // TODO: Temporary hack until the MetricQueryService has been ported to RpcEndpoint metricRegistry.startQueryService(metricQueryServiceActorSystem, resourceId); blobCacheService = new BlobCacheService( configuration, highAvailabilityServices.createBlobStore(), null ); taskManager = startTaskManager( this.configuration, this.resourceId, rpcService, highAvailabilityServices, heartbeatServices, metricRegistry, blobCacheService, false, this); this.terminationFuture = new CompletableFuture<>(); this.shutdown = false; MemoryLogger.startIfConfigured(LOG, configuration, metricQueryServiceActorSystem); }
Example 2
Source File: ClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
protected HeartbeatServices createHeartbeatServices(Configuration configuration) { return HeartbeatServices.fromConfiguration(configuration); }
Example 3
Source File: TaskManagerRunner.java From flink with Apache License 2.0 | 4 votes |
public TaskManagerRunner(Configuration configuration, ResourceID resourceId) throws Exception { this.configuration = checkNotNull(configuration); this.resourceId = checkNotNull(resourceId); timeout = AkkaUtils.getTimeoutAsTime(configuration); this.executor = java.util.concurrent.Executors.newScheduledThreadPool( Hardware.getNumberCPUCores(), new ExecutorThreadFactory("taskmanager-future")); highAvailabilityServices = HighAvailabilityServicesUtils.createHighAvailabilityServices( configuration, executor, HighAvailabilityServicesUtils.AddressResolution.TRY_ADDRESS_RESOLUTION); rpcService = createRpcService(configuration, highAvailabilityServices); HeartbeatServices heartbeatServices = HeartbeatServices.fromConfiguration(configuration); metricRegistry = new MetricRegistryImpl( MetricRegistryConfiguration.fromConfiguration(configuration), ReporterSetup.fromConfiguration(configuration)); final RpcService metricQueryServiceRpcService = MetricUtils.startMetricsRpcService(configuration, rpcService.getAddress()); metricRegistry.startQueryService(metricQueryServiceRpcService, resourceId); blobCacheService = new BlobCacheService( configuration, highAvailabilityServices.createBlobStore(), null ); taskManager = startTaskManager( this.configuration, this.resourceId, rpcService, highAvailabilityServices, heartbeatServices, metricRegistry, blobCacheService, false, this); this.terminationFuture = new CompletableFuture<>(); this.shutdown = false; MemoryLogger.startIfConfigured(LOG, configuration, terminationFuture); }
Example 4
Source File: ClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
protected HeartbeatServices createHeartbeatServices(Configuration configuration) { return HeartbeatServices.fromConfiguration(configuration); }
Example 5
Source File: TaskManagerRunner.java From flink with Apache License 2.0 | 4 votes |
public TaskManagerRunner(Configuration configuration, PluginManager pluginManager) throws Exception { this.configuration = checkNotNull(configuration); timeout = AkkaUtils.getTimeoutAsTime(configuration); this.executor = java.util.concurrent.Executors.newScheduledThreadPool( Hardware.getNumberCPUCores(), new ExecutorThreadFactory("taskmanager-future")); highAvailabilityServices = HighAvailabilityServicesUtils.createHighAvailabilityServices( configuration, executor, HighAvailabilityServicesUtils.AddressResolution.NO_ADDRESS_RESOLUTION); rpcService = createRpcService(configuration, highAvailabilityServices); this.resourceId = new ResourceID(getTaskManagerResourceID(configuration, rpcService.getAddress(), rpcService.getPort())); HeartbeatServices heartbeatServices = HeartbeatServices.fromConfiguration(configuration); metricRegistry = new MetricRegistryImpl( MetricRegistryConfiguration.fromConfiguration(configuration), ReporterSetup.fromConfiguration(configuration, pluginManager)); final RpcService metricQueryServiceRpcService = MetricUtils.startRemoteMetricsRpcService(configuration, rpcService.getAddress()); metricRegistry.startQueryService(metricQueryServiceRpcService, resourceId); blobCacheService = new BlobCacheService( configuration, highAvailabilityServices.createBlobStore(), null ); final ExternalResourceInfoProvider externalResourceInfoProvider = ExternalResourceUtils.createStaticExternalResourceInfoProvider( ExternalResourceUtils.getExternalResourceAmountMap(configuration), ExternalResourceUtils.externalResourceDriversFromConfig(configuration, pluginManager)); taskManager = startTaskManager( this.configuration, this.resourceId, rpcService, highAvailabilityServices, heartbeatServices, metricRegistry, blobCacheService, false, externalResourceInfoProvider, this); this.terminationFuture = new CompletableFuture<>(); this.shutdown = false; MemoryLogger.startIfConfigured(LOG, configuration, terminationFuture); }
Example 6
Source File: ClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
protected HeartbeatServices createHeartbeatServices(Configuration configuration) { return HeartbeatServices.fromConfiguration(configuration); }