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));
}
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;
}
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;
}
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;
}
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));
}
Aggregations