Search in sources :

Example 6 with XodusStoreFactory

use of com.bakdata.conquery.models.config.XodusStoreFactory in project conquery by bakdata.

the class TestConquery method configurePathsAndLogging.

@SneakyThrows
public static void configurePathsAndLogging(ConqueryConfig config, File tmpDir) {
    config.setFailOnError(true);
    XodusStoreFactory storageConfig = new XodusStoreFactory();
    storageConfig.setDirectory(tmpDir.toPath());
    config.setStorage(storageConfig);
    config.getStandalone().setNumberOfShardNodes(2);
    // configure logging
    config.setLoggingFactory(new TestLoggingFactory());
    config.getCluster().setEntityBucketSize(3);
}
Also used : XodusStoreFactory(com.bakdata.conquery.models.config.XodusStoreFactory) SneakyThrows(lombok.SneakyThrows)

Example 7 with XodusStoreFactory

use of com.bakdata.conquery.models.config.XodusStoreFactory in project conquery by bakdata.

the class ApiTokenRealmTest method overrideConfig.

@Override
public ConqueryConfig overrideConfig(ConqueryConfig conf, final File workDir) {
    XodusStoreFactory storageConfig = (XodusStoreFactory) conf.getStorage();
    final Path storageDir = workDir.toPath().resolve(storageConfig.getDirectory().resolve(getClass().getSimpleName()));
    return conf.withStorage(storageConfig.withDirectory(storageDir)).withAuthenticationRealms(ImmutableList.<AuthenticationRealmFactory>builder().addAll(conf.getAuthenticationRealms()).add(new ApiTokenRealmFactory(storageDir, new XodusConfig())).build());
}
Also used : Path(java.nio.file.Path) XodusStoreFactory(com.bakdata.conquery.models.config.XodusStoreFactory) ApiTokenRealmFactory(com.bakdata.conquery.models.config.auth.ApiTokenRealmFactory) XodusConfig(com.bakdata.conquery.models.config.XodusConfig) AuthenticationRealmFactory(com.bakdata.conquery.models.config.auth.AuthenticationRealmFactory)

Aggregations

XodusStoreFactory (com.bakdata.conquery.models.config.XodusStoreFactory)7 Dictionary (com.bakdata.conquery.models.dictionary.Dictionary)2 EncodedDictionary (com.bakdata.conquery.models.dictionary.EncodedDictionary)2 MapDictionary (com.bakdata.conquery.models.dictionary.MapDictionary)2 DictionaryId (com.bakdata.conquery.models.identifiable.ids.specific.DictionaryId)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 SequenceInputStream (java.io.SequenceInputStream)2 Path (java.nio.file.Path)2 Test (org.junit.jupiter.api.Test)2 ConqueryConfig (com.bakdata.conquery.models.config.ConqueryConfig)1 XodusConfig (com.bakdata.conquery.models.config.XodusConfig)1 ApiTokenRealmFactory (com.bakdata.conquery.models.config.auth.ApiTokenRealmFactory)1 AuthenticationRealmFactory (com.bakdata.conquery.models.config.auth.AuthenticationRealmFactory)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ObjectReader (com.fasterxml.jackson.databind.ObjectReader)1 ObjectWriter (com.fasterxml.jackson.databind.ObjectWriter)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 GroovyShell (groovy.lang.GroovyShell)1 Tuple (groovy.lang.Tuple)1