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