Search in sources :

Example 1 with TaskExecutor

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

the class GobblinHelixTaskTest method setUp.

@BeforeClass
public void setUp() throws IOException {
    Configuration configuration = new Configuration();
    configuration.setInt(ConfigurationKeys.TASK_EXECUTOR_THREADPOOL_SIZE_KEY, 1);
    this.taskExecutor = new TaskExecutor(configuration);
    this.helixManager = Mockito.mock(HelixManager.class);
    Mockito.when(this.helixManager.getInstanceName()).thenReturn(GobblinHelixTaskTest.class.getSimpleName());
    this.taskStateTracker = new GobblinHelixTaskStateTracker(new Properties());
    this.localFs = FileSystem.getLocal(configuration);
    this.appWorkDir = new Path(GobblinHelixTaskTest.class.getSimpleName());
    this.taskOutputDir = new Path(this.appWorkDir, "output");
}
Also used : Path(org.apache.hadoop.fs.Path) TaskExecutor(org.apache.gobblin.runtime.TaskExecutor) HelixManager(org.apache.helix.HelixManager) Configuration(org.apache.hadoop.conf.Configuration) Properties(java.util.Properties) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with TaskExecutor

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

the class SingleTaskRunner method getServices.

private void getServices() {
    final Properties properties = ConfigUtils.configToProperties(this.clusterConfig);
    this.taskExecutor = new TaskExecutor(properties);
    this.taskStateTracker = new GobblinHelixTaskStateTracker(properties);
    final List<Service> services = Lists.newArrayList(this.taskExecutor, this.taskStateTracker);
    this.serviceManager = new ServiceManager(services);
}
Also used : TaskExecutor(org.apache.gobblin.runtime.TaskExecutor) ServiceManager(com.google.common.util.concurrent.ServiceManager) Service(com.google.common.util.concurrent.Service) Properties(java.util.Properties)

Aggregations

Properties (java.util.Properties)2 TaskExecutor (org.apache.gobblin.runtime.TaskExecutor)2 Service (com.google.common.util.concurrent.Service)1 ServiceManager (com.google.common.util.concurrent.ServiceManager)1 Configuration (org.apache.hadoop.conf.Configuration)1 Path (org.apache.hadoop.fs.Path)1 HelixManager (org.apache.helix.HelixManager)1 BeforeClass (org.testng.annotations.BeforeClass)1