use of org.apache.samza.metadatastore.MetadataStoreFactory in project samza by apache.
the class LocalJobPlanner method getMetadataStore.
private MetadataStore getMetadataStore() {
String metadataStoreFactoryClass = appDesc.getConfig().get(METADATA_STORE_FACTORY_CONFIG);
if (metadataStoreFactoryClass == null) {
metadataStoreFactoryClass = DEFAULT_METADATA_STORE_FACTORY;
}
MetadataStoreFactory metadataStoreFactory = ReflectionUtil.getObj(metadataStoreFactoryClass, MetadataStoreFactory.class);
return metadataStoreFactory.getMetadataStore(STREAM_CREATION_METADATA_STORE, appDesc.getConfig(), new MetricsRegistryMap());
}
use of org.apache.samza.metadatastore.MetadataStoreFactory in project samza by apache.
the class TestLocalApplicationRunner method testGetCoordinatorStreamStoreFactoryWithJobCoordinatorSystem.
/**
* Default metadata store factory should not be null if job coordinator system defined and the default
* ZkJobCoordinator is used.
*/
@Test
public void testGetCoordinatorStreamStoreFactoryWithJobCoordinatorSystem() {
Optional<MetadataStoreFactory> metadataStoreFactory = LocalApplicationRunner.getDefaultCoordinatorStreamStoreFactory(new MapConfig(ImmutableMap.of(JobConfig.JOB_COORDINATOR_SYSTEM, "test-system")));
assertTrue(metadataStoreFactory.isPresent());
}
Aggregations