Search in sources :

Example 1 with TopologyCatalog

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

the class OrchestratorTest method setup.

@BeforeClass
public void setup() throws Exception {
    cleanUpDir(TOPOLOGY_SPEC_STORE_DIR);
    cleanUpDir(FLOW_SPEC_STORE_DIR);
    Properties orchestratorProperties = new Properties();
    Properties topologyProperties = new Properties();
    topologyProperties.put("specStore.fs.dir", TOPOLOGY_SPEC_STORE_DIR);
    Properties flowProperties = new Properties();
    flowProperties.put("specStore.fs.dir", FLOW_SPEC_STORE_DIR);
    this.serviceLauncher = new ServiceBasedAppLauncher(orchestratorProperties, "OrchestratorCatalogTest");
    this.topologyCatalog = new TopologyCatalog(ConfigUtils.propertiesToConfig(topologyProperties), Optional.of(logger));
    this.serviceLauncher.addService(topologyCatalog);
    this.flowCatalog = new FlowCatalog(ConfigUtils.propertiesToConfig(flowProperties), Optional.of(logger));
    this.serviceLauncher.addService(flowCatalog);
    this.orchestrator = new Orchestrator(ConfigUtils.propertiesToConfig(orchestratorProperties), Optional.of(this.topologyCatalog), Optional.of(logger));
    this.topologyCatalog.addListener(orchestrator);
    this.flowCatalog.addListener(orchestrator);
    // Start application
    this.serviceLauncher.start();
    // Create Spec to play with
    this.topologySpec = initTopologySpec();
    this.flowSpec = initFlowSpec();
}
Also used : ServiceBasedAppLauncher(org.apache.gobblin.runtime.app.ServiceBasedAppLauncher) Properties(java.util.Properties) TopologyCatalog(org.apache.gobblin.runtime.spec_catalog.TopologyCatalog) FlowCatalog(org.apache.gobblin.runtime.spec_catalog.FlowCatalog) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with TopologyCatalog

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

the class TopologyCatalogTest method setup.

@BeforeClass
public void setup() throws Exception {
    File specStoreDir = new File(SPEC_STORE_DIR);
    if (specStoreDir.exists()) {
        FileUtils.deleteDirectory(specStoreDir);
    }
    Properties properties = new Properties();
    properties.put("specStore.fs.dir", SPEC_STORE_DIR);
    this.serviceLauncher = new ServiceBasedAppLauncher(properties, "TopologyCatalogTest");
    this.topologyCatalog = new TopologyCatalog(ConfigUtils.propertiesToConfig(properties), Optional.of(logger));
    this.serviceLauncher.addService(topologyCatalog);
    // Start Catalog
    this.serviceLauncher.start();
    // Create Spec to play with
    this.topologySpec = initTopologySpec();
}
Also used : ServiceBasedAppLauncher(org.apache.gobblin.runtime.app.ServiceBasedAppLauncher) Properties(java.util.Properties) File(java.io.File) TopologyCatalog(org.apache.gobblin.runtime.spec_catalog.TopologyCatalog) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

Properties (java.util.Properties)2 ServiceBasedAppLauncher (org.apache.gobblin.runtime.app.ServiceBasedAppLauncher)2 TopologyCatalog (org.apache.gobblin.runtime.spec_catalog.TopologyCatalog)2 BeforeClass (org.testng.annotations.BeforeClass)2 File (java.io.File)1 FlowCatalog (org.apache.gobblin.runtime.spec_catalog.FlowCatalog)1