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();
}
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();
}
Aggregations