Search in sources :

Example 66 with BaseConfiguration

use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.

the class PersistitStorageSetup method getPersistitGraphConfig.

public static Configuration getPersistitGraphConfig() {
    BaseConfiguration config = new BaseConfiguration();
    config.subset(GraphDatabaseConfiguration.STORAGE_NAMESPACE).addProperty(GraphDatabaseConfiguration.STORAGE_DIRECTORY_KEY, getHomeDir());
    config.subset(GraphDatabaseConfiguration.STORAGE_NAMESPACE).addProperty(GraphDatabaseConfiguration.STORAGE_BACKEND_KEY, "persistit");
    return config;
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration)

Example 67 with BaseConfiguration

use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.

the class HBaseStorageSetup method getHBaseStorageConfiguration.

public static Configuration getHBaseStorageConfiguration() {
    BaseConfiguration config = new BaseConfiguration();
    config.addProperty(GraphDatabaseConfiguration.STORAGE_BACKEND_KEY, "hbase");
    config.addProperty(GraphDatabaseConfiguration.CONNECTION_TIMEOUT_KEY, 60000L);
    return config;
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration)

Example 68 with BaseConfiguration

use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.

the class HBaseStorageSetup method getHBaseGraphConfiguration.

public static Configuration getHBaseGraphConfiguration() {
    BaseConfiguration config = new BaseConfiguration();
    config.subset(GraphDatabaseConfiguration.STORAGE_NAMESPACE).addProperty(GraphDatabaseConfiguration.STORAGE_BACKEND_KEY, "hbase");
    config.subset(GraphDatabaseConfiguration.STORAGE_NAMESPACE).addProperty(GraphDatabaseConfiguration.CONNECTION_TIMEOUT_KEY, 60000L);
    return config;
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration)

Example 69 with BaseConfiguration

use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.

the class CassandraThriftESAssemblyIT method clearData.

@After
public void clearData() throws Exception {
    Configuration c = new BaseConfiguration();
    c.setProperty("hostname", "127.0.0.1");
    CassandraThriftStoreManager m = new CassandraThriftStoreManager(c);
    m.clearStorage();
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) Configuration(org.apache.commons.configuration.Configuration) BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) CassandraThriftStoreManager(com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager) After(org.junit.After)

Example 70 with BaseConfiguration

use of org.apache.commons.configuration.BaseConfiguration in project graph by krlawrence.

the class ListAirports method loadGraph.

// -------------------------------------------------------------
// Try to create a new graph and load the specified GraphML file
// -------------------------------------------------------------
public boolean loadGraph(String name) {
    // Make sure index ID values are set as LONG values.
    // If this is not done, when we try to sort results by vertex
    // ID later it will not sort the way you would expect it to.
    BaseConfiguration conf = new BaseConfiguration();
    conf.setProperty("gremlin.tinkergraph.vertexIdManager", "LONG");
    conf.setProperty("gremlin.tinkergraph.edgeIdManager", "LONG");
    conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager", "LONG");
    // Create a new instance that uses this configuration.
    tg = TinkerGraph.open(conf);
    // Load the graph and time how long it takes.
    System.out.println("Loading " + name);
    long t1 = System.currentTimeMillis();
    System.out.println(t1);
    try {
        tg.io(IoCore.graphml()).readGraph(name);
    } catch (IOException e) {
        System.out.println("ERROR - GraphML file not found or invalid.");
        return false;
    }
    long t2 = System.currentTimeMillis();
    System.out.println(t2 + "(" + (t2 - t1) + ")");
    System.out.println("Graph loaded\n");
    g = tg.traversal();
    return true;
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) IOException(java.io.IOException)

Aggregations

BaseConfiguration (org.apache.commons.configuration.BaseConfiguration)71 Test (org.junit.Test)24 Configuration (org.apache.commons.configuration.Configuration)19 GraphDatabaseConfiguration (com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration)15 CommonsConfiguration (com.thinkaurelius.titan.diskstorage.configuration.backend.CommonsConfiguration)8 AbstractConfiguration (org.apache.commons.configuration.AbstractConfiguration)7 ExternalView (org.apache.helix.model.ExternalView)7 Test (org.testng.annotations.Test)7 ModifiableConfiguration (com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)5 File (java.io.File)5 InstanceConfig (org.apache.helix.model.InstanceConfig)5 BeforeClass (org.junit.BeforeClass)5 LLCSegmentName (com.linkedin.pinot.common.utils.LLCSegmentName)4 BasicConfiguration (com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration)4 Configuration (com.thinkaurelius.titan.diskstorage.configuration.Configuration)4 ElasticSearchIndex (com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex)4 ArrayList (java.util.ArrayList)4 Map (java.util.Map)4 RoutingTableBuilder (com.linkedin.pinot.routing.builder.RoutingTableBuilder)3 ImmutableMap (com.google.common.collect.ImmutableMap)2