Search in sources :

Example 1 with InMemoryStorageManager

use of com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager in project streamline by hortonworks.

the class AbstractServiceRegistrarTest method resetEnvironmentService.

protected void resetEnvironmentService() {
    dao = new InMemoryStorageManager();
    transactionManager = new NOOPTransactionManager();
    environmentService = new EnvironmentService(dao);
}
Also used : InMemoryStorageManager(com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager) NOOPTransactionManager(com.hortonworks.registries.storage.NOOPTransactionManager) EnvironmentService(com.hortonworks.streamline.streams.cluster.service.EnvironmentService)

Example 2 with InMemoryStorageManager

use of com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager in project registry by hortonworks.

the class GuavaCacheTest method setCache.

private static void setCache() {
    final InMemoryStorageManager dao = new InMemoryStorageManager();
    final CacheBuilder cacheBuilder = getGuavaCacheBuilder();
    cache = getCache(dao, cacheBuilder);
}
Also used : InMemoryStorageManager(com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager) CacheBuilder(com.google.common.cache.CacheBuilder)

Example 3 with InMemoryStorageManager

use of com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager in project registry by hortonworks.

the class AvroSchemaRegistryTest method setup.

@Before
public void setup() throws IOException {
    schema1 = getSchema("/device.avsc");
    schema2 = getSchema("/device-compat.avsc");
    schemaName = "org.hwx.schemas.test-schema." + UUID.randomUUID();
    StorageManager storageManager = new InMemoryStorageManager();
    Collection<Map<String, Object>> schemaProvidersConfig = Collections.singleton(Collections.singletonMap("providerClass", AvroSchemaProvider.class.getName()));
    schemaRegistry = new DefaultSchemaRegistry(storageManager, null, schemaProvidersConfig, new HAServerNotificationManager());
    schemaRegistry.init(Collections.<String, Object>emptyMap());
}
Also used : InMemoryStorageManager(com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager) StorageManager(com.hortonworks.registries.storage.StorageManager) InMemoryStorageManager(com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager) Map(java.util.Map) HAServerNotificationManager(com.hortonworks.registries.schemaregistry.HAServerNotificationManager) DefaultSchemaRegistry(com.hortonworks.registries.schemaregistry.DefaultSchemaRegistry) Before(org.junit.Before)

Aggregations

InMemoryStorageManager (com.hortonworks.registries.storage.impl.memory.InMemoryStorageManager)3 CacheBuilder (com.google.common.cache.CacheBuilder)1 DefaultSchemaRegistry (com.hortonworks.registries.schemaregistry.DefaultSchemaRegistry)1 HAServerNotificationManager (com.hortonworks.registries.schemaregistry.HAServerNotificationManager)1 NOOPTransactionManager (com.hortonworks.registries.storage.NOOPTransactionManager)1 StorageManager (com.hortonworks.registries.storage.StorageManager)1 EnvironmentService (com.hortonworks.streamline.streams.cluster.service.EnvironmentService)1 Map (java.util.Map)1 Before (org.junit.Before)1