Search in sources :

Example 31 with ModifiableConfiguration

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

the class CassandraStorageSetup method getEmbeddedCassandraPartitionConfiguration.

public static ModifiableConfiguration getEmbeddedCassandraPartitionConfiguration(String ks) {
    ModifiableConfiguration config = getEmbeddedConfiguration(ks);
    config.set(IDS_FLUSH, false);
    return config;
}
Also used : ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)

Example 32 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 33 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 34 with ModifiableConfiguration

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

the class BerkeleyElasticsearchTest method getConfiguration.

@Override
public WriteConfiguration getConfiguration() {
    ModifiableConfiguration config = getBerkeleyJEConfiguration();
    //Add index
    config.set(INDEX_BACKEND, "elasticsearch", INDEX);
    config.set(LOCAL_MODE, true, INDEX);
    config.set(CLIENT_ONLY, false, INDEX);
    config.set(INDEX_DIRECTORY, StorageSetup.getHomeDir("es"), INDEX);
    return config.getConfiguration();
}
Also used : ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)

Example 35 with ModifiableConfiguration

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

the class ElasticSearchConfigTest method testLocalNodeUsingExt.

@Test
public void testLocalNodeUsingExt() throws BackendException, InterruptedException {
    String baseDir = Joiner.on(File.separator).join("target", "es", "jvmlocal_ext");
    assertFalse(new File(baseDir + File.separator + "data").exists());
    CommonsConfiguration cc = new CommonsConfiguration(new BaseConfiguration());
    cc.set("index." + INDEX_NAME + ".elasticsearch.ext.node.data", "true");
    cc.set("index." + INDEX_NAME + ".elasticsearch.ext.node.client", "false");
    cc.set("index." + INDEX_NAME + ".elasticsearch.ext.node.local", "true");
    cc.set("index." + INDEX_NAME + ".elasticsearch.ext.path.data", baseDir + File.separator + "data");
    cc.set("index." + INDEX_NAME + ".elasticsearch.ext.path.work", baseDir + File.separator + "work");
    cc.set("index." + INDEX_NAME + ".elasticsearch.ext.path.logs", baseDir + File.separator + "logs");
    ModifiableConfiguration config = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS, cc, BasicConfiguration.Restriction.NONE);
    config.set(INTERFACE, ElasticSearchSetup.NODE.toString(), INDEX_NAME);
    Configuration indexConfig = config.restrictTo(INDEX_NAME);
    IndexProvider idx = new ElasticSearchIndex(indexConfig);
    simpleWriteAndQuery(idx);
    idx.close();
    assertTrue(new File(baseDir + File.separator + "data").exists());
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) Configuration(com.thinkaurelius.titan.diskstorage.configuration.Configuration) CommonsConfiguration(com.thinkaurelius.titan.diskstorage.configuration.backend.CommonsConfiguration) BasicConfiguration(com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration) GraphDatabaseConfiguration(com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration) BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration) CommonsConfiguration(com.thinkaurelius.titan.diskstorage.configuration.backend.CommonsConfiguration) ModifiableConfiguration(com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration) ElasticSearchIndex(com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex) File(java.io.File) Test(org.junit.Test)

Aggregations

ModifiableConfiguration (com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)50 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 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 TitanGraph (com.thinkaurelius.titan.core.TitanGraph)1