Search in sources :

Example 1 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class JanusGraphOperationCountingTest method getConfiguration.

@Override
public WriteConfiguration getConfiguration() {
    WriteConfiguration config = getBaseConfiguration();
    ModifiableConfiguration modifiableConfiguration = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS, config, BasicConfiguration.Restriction.NONE);
    modifiableConfiguration.set(BASIC_METRICS, true);
    modifiableConfiguration.set(METRICS_MERGE_STORES, false);
    modifiableConfiguration.set(PROPERTY_PREFETCHING, false);
    modifiableConfiguration.set(DB_CACHE, false);
    return config;
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration) WriteConfiguration(org.janusgraph.diskstorage.configuration.WriteConfiguration)

Example 2 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class InMemoryGraphComputerProvider method getJanusGraphConfiguration.

@Override
public ModifiableConfiguration getJanusGraphConfiguration(String graphName, Class<?> test, String testMethodName) {
    ModifiableConfiguration config = super.getJanusGraphConfiguration(graphName, test, testMethodName);
    config.setAll(StorageSetup.getInMemoryConfiguration().getAll());
    config.set(GraphDatabaseConfiguration.STORAGE_TRANSACTIONAL, false);
    return config;
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 3 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class IDAuthorityTest method getBasicConfig.

public static ModifiableConfiguration getBasicConfig() {
    ModifiableConfiguration c = GraphDatabaseConfiguration.buildGraphConfiguration();
    c.set(IDAUTHORITY_WAIT, Duration.ofMillis(100L));
    c.set(IDS_BLOCK_SIZE, 400);
    return c;
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 4 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class IDAuthorityTest method configs.

@Parameterized.Parameters
public static Collection<Object[]> configs() {
    final List<Object[]> configurations = new ArrayList<>();
    ModifiableConfiguration c = getBasicConfig();
    configurations.add(new Object[] { c.getConfiguration() });
    c = getBasicConfig();
    c.set(IDAUTHORITY_CAV_BITS, 9);
    c.set(IDAUTHORITY_CAV_TAG, 511);
    configurations.add(new Object[] { c.getConfiguration() });
    c = getBasicConfig();
    c.set(IDAUTHORITY_CAV_RETRIES, 10);
    c.set(IDAUTHORITY_WAIT, Duration.ofMillis(10L));
    c.set(IDAUTHORITY_CAV_BITS, 7);
    // c.set(IDAUTHORITY_RANDOMIZE_UNIQUEID,true);
    c.set(IDAUTHORITY_CONFLICT_AVOIDANCE, ConflictAvoidanceMode.GLOBAL_AUTO);
    configurations.add(new Object[] { c.getConfiguration() });
    return configurations;
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 5 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class InMemoryConfigurationTest method initialize.

public void initialize(ConfigOption option, Object value) {
    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "inmemory");
    config.set(option, value);
    graph = (StandardJanusGraph) JanusGraphFactory.open(config);
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Aggregations

ModifiableConfiguration (org.janusgraph.diskstorage.configuration.ModifiableConfiguration)62 Test (org.junit.Test)16 BaseConfiguration (org.apache.commons.configuration.BaseConfiguration)10 CommonsConfiguration (org.janusgraph.diskstorage.configuration.backend.CommonsConfiguration)10 KeyColumnValueStoreTest (org.janusgraph.diskstorage.KeyColumnValueStoreTest)6 BasicConfiguration (org.janusgraph.diskstorage.configuration.BasicConfiguration)5 Configuration (org.janusgraph.diskstorage.configuration.Configuration)5 GraphDatabaseConfiguration (org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration)5 HashMap (java.util.HashMap)3 Map (java.util.Map)3 StandardBaseTransactionConfig (org.janusgraph.diskstorage.util.StandardBaseTransactionConfig)3 WriteConfiguration (org.janusgraph.diskstorage.configuration.WriteConfiguration)2 InMemoryStoreManager (org.janusgraph.diskstorage.keycolumnvalue.inmemory.InMemoryStoreManager)2 IndexRemoveJob (org.janusgraph.graphdb.olap.job.IndexRemoveJob)2 IndexRepairJob (org.janusgraph.graphdb.olap.job.IndexRepairJob)2 CassandraHadoopScanRunner (org.janusgraph.hadoop.scan.CassandraHadoopScanRunner)2 HBaseHadoopScanRunner (org.janusgraph.hadoop.scan.HBaseHadoopScanRunner)2 Before (org.junit.Before)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 IOException (java.io.IOException)1