Search in sources :

Example 1 with TaskStateTracker

use of org.apache.gobblin.runtime.TaskStateTracker in project incubator-gobblin by apache.

the class GobblinTaskRunner method getInProcessTaskFactory.

private TaskFactory getInProcessTaskFactory(TaskExecutor taskExecutor) {
    Properties properties = ConfigUtils.configToProperties(this.config);
    URI rootPathUri = PathUtils.getRootPath(this.appWorkPath).toUri();
    Config stateStoreJobConfig = ConfigUtils.propertiesToConfig(properties).withValue(ConfigurationKeys.STATE_STORE_FS_URI_KEY, ConfigValueFactory.fromAnyRef(rootPathUri.toString()));
    TaskStateTracker taskStateTracker = new GobblinHelixTaskStateTracker(properties);
    services.add(taskExecutor);
    services.add(taskStateTracker);
    services.add(new JMXReportingService(ImmutableMap.of("task.executor", taskExecutor.getTaskExecutorQueueMetricSet())));
    TaskFactory taskFactory = new GobblinHelixTaskFactory(this.containerMetrics, taskExecutor, taskStateTracker, this.fs, this.appWorkPath, stateStoreJobConfig, this.helixManager);
    return taskFactory;
}
Also used : Config(com.typesafe.config.Config) TaskFactory(org.apache.helix.task.TaskFactory) TaskStateTracker(org.apache.gobblin.runtime.TaskStateTracker) Properties(java.util.Properties) JMXReportingService(org.apache.gobblin.runtime.services.JMXReportingService) URI(java.net.URI)

Aggregations

Config (com.typesafe.config.Config)1 URI (java.net.URI)1 Properties (java.util.Properties)1 TaskStateTracker (org.apache.gobblin.runtime.TaskStateTracker)1 JMXReportingService (org.apache.gobblin.runtime.services.JMXReportingService)1 TaskFactory (org.apache.helix.task.TaskFactory)1