Search in sources :

Example 51 with ModifiableConfiguration

use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.

the class AbstractCassandraStoreTest method testDisableCFCompressor.

@Test
public void testDisableCFCompressor() throws BackendException {
    final String cf = TEST_CF_NAME + "_nocompress";
    ModifiableConfiguration config = getBaseStorageConfiguration();
    config.set(AbstractCassandraStoreManager.CF_COMPRESSION, false);
    AbstractCassandraStoreManager mgr = openStorageManager(config);
    // N.B.: clearStorage() truncates CFs but does not delete them
    mgr.openDatabase(cf);
    assertEquals(Collections.emptyMap(), mgr.getCompressionOptions(cf));
}
Also used : ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration) Test(org.junit.Test) KeyColumnValueStoreTest(com.thinkaurelius.titan.diskstorage.KeyColumnValueStoreTest)

Example 52 with ModifiableConfiguration

use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.

the class BerkeleyGraphComputerProvider method getTitanConfiguration.

@Override
public ModifiableConfiguration getTitanConfiguration(String graphName, Class<?> test, String testMethodName) {
    ModifiableConfiguration config = BerkeleyStorageSetup.getBerkeleyJEConfiguration(StorageSetup.getHomeDir(graphName));
    config.set(GraphDatabaseConfiguration.IDAUTHORITY_WAIT, Duration.ofMillis(20));
    config.set(GraphDatabaseConfiguration.STORAGE_TRANSACTIONAL, false);
    return config;
}
Also used : ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)

Example 53 with ModifiableConfiguration

use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.

the class AbstractTitanGraphProvider method getBaseConfiguration.

@Override
public Map<String, Object> getBaseConfiguration(String graphName, Class<?> test, String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
    ModifiableConfiguration conf = getTitanConfiguration(graphName, test, testMethodName);
    conf.set(GraphDatabaseConfiguration.COMPUTER_RESULT_MODE, "persist");
    conf.set(GraphDatabaseConfiguration.AUTO_TYPE, "tp3");
    Map<String, Object> result = new HashMap<>();
    conf.getAll().entrySet().stream().forEach(e -> result.put(ConfigElement.getPath(e.getKey().element, e.getKey().umbrellaElements), e.getValue()));
    result.put(Graph.GRAPH, TitanFactory.class.getName());
    return result;
}
Also used : HashMap(java.util.HashMap) ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration) TitanFactory(com.thinkaurelius.titan.core.TitanFactory)

Example 54 with ModifiableConfiguration

use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.

the class HBaseStorageSetup method getHBaseConfiguration.

public static ModifiableConfiguration getHBaseConfiguration(String tableName) {
    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "hbase");
    if (!StringUtils.isEmpty(tableName))
        config.set(HBaseStoreManager.HBASE_TABLE, tableName);
    config.set(GraphDatabaseConfiguration.TIMESTAMP_PROVIDER, HBaseStoreManager.PREFERRED_TIMESTAMPS);
    config.set(SimpleBulkPlacementStrategy.CONCURRENT_PARTITIONS, 1);
    //                "hbase.zookeeper.property.clientPort",2181);
    return config;
}
Also used : ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)

Example 55 with ModifiableConfiguration

use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.

the class KCVSLogTest method openLogManager.

@Override
public LogManager openLogManager(String senderId, boolean requiresOrderPreserving) throws BackendException {
    storeManager = openStorageManager();
    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID, senderId);
    config.set(GraphDatabaseConfiguration.LOG_READ_INTERVAL, Duration.ofMillis(500L), LOG_NAME);
    //To ensure that the write order is preserved in reading, we need to ensure that all writes go to the same partition
    //otherwise readers will independently read from the partitions out-of-order by design to avoid having to synchronize
    config.set(KCVSLogManager.LOG_FIXED_PARTITION, requiresOrderPreserving, LOG_NAME);
    return new KCVSLogManager(storeManager, config.restrictTo(LOG_NAME));
}
Also used : KCVSLogManager(com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLogManager) ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)

Aggregations

ModifiableConfiguration (com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)55 Test (org.junit.Test)13 Configuration (com.thinkaurelius.titan.diskstorage.configuration.Configuration)9 ElasticSearchIndex (com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex)9 GraphDatabaseConfiguration (com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration)9 CommonsConfiguration (com.thinkaurelius.titan.diskstorage.configuration.backend.CommonsConfiguration)8 BaseConfiguration (org.apache.commons.configuration.BaseConfiguration)8 BasicConfiguration (com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration)7 File (java.io.File)3 KeyColumnValueStoreTest (com.thinkaurelius.titan.diskstorage.KeyColumnValueStoreTest)2 WriteConfiguration (com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration)2 IndexProviderTest (com.thinkaurelius.titan.diskstorage.indexing.IndexProviderTest)2 InMemoryStoreManager (com.thinkaurelius.titan.diskstorage.keycolumnvalue.inmemory.InMemoryStoreManager)2 StandardBaseTransactionConfig (com.thinkaurelius.titan.diskstorage.util.StandardBaseTransactionConfig)2 IndexRemoveJob (com.thinkaurelius.titan.graphdb.olap.job.IndexRemoveJob)2 IndexRepairJob (com.thinkaurelius.titan.graphdb.olap.job.IndexRepairJob)2 CassandraHadoopScanRunner (com.thinkaurelius.titan.hadoop.scan.CassandraHadoopScanRunner)2 HBaseHadoopScanRunner (com.thinkaurelius.titan.hadoop.scan.HBaseHadoopScanRunner)2 Map (java.util.Map)2 TitanFactory (com.thinkaurelius.titan.core.TitanFactory)1