use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.
the class GraphOfTheGodsFactory method create.
public static TitanGraph create(final String directory) {
BaseConfiguration config = new BaseConfiguration();
Configuration storage = config.subset(GraphDatabaseConfiguration.STORAGE_NAMESPACE);
// configuring local backend
storage.setProperty(GraphDatabaseConfiguration.STORAGE_BACKEND_KEY, "local");
storage.setProperty(GraphDatabaseConfiguration.STORAGE_DIRECTORY_KEY, directory);
// configuring elastic search index
Configuration index = storage.subset(GraphDatabaseConfiguration.INDEX_NAMESPACE).subset(INDEX_NAME);
index.setProperty(INDEX_BACKEND_KEY, "elasticsearch");
index.setProperty("local-mode", true);
index.setProperty("client-only", false);
index.setProperty(STORAGE_DIRECTORY_KEY, directory + File.separator + "es");
TitanGraph graph = TitanFactory.open(config);
GraphOfTheGodsFactory.load(graph);
return graph;
}
use of org.apache.commons.configuration.BaseConfiguration in project java-chassis by ServiceComb.
the class TestInstancePropertyDiscoveryFilter method beforeCls.
@BeforeClass
public static void beforeCls() {
AbstractConfiguration configuration = new BaseConfiguration();
configuration.addProperty("servicecomb.loadbalance.test.flowsplitFilter.policy", "org.apache.servicecomb.loadbalance.filter.SimpleFlowsplitFilter");
configuration.addProperty("servicecomb.loadbalance.test.flowsplitFilter.options.tag0", "value0");
}
use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.
the class StorageSetup method getInMemoryGraph.
public static TitanGraph getInMemoryGraph() {
BaseConfiguration config = new BaseConfiguration();
config.subset(GraphDatabaseConfiguration.STORAGE_NAMESPACE).addProperty(GraphDatabaseConfiguration.STORAGE_BACKEND_KEY, "inmemory");
return TitanFactory.open(config);
}
use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.
the class ElasticSearchBerkeleyDBTest method getElasticSearchBDBConfig.
public static final Configuration getElasticSearchBDBConfig() {
BaseConfiguration config = new BaseConfiguration();
config.subset(STORAGE_NAMESPACE).addProperty(STORAGE_BACKEND_KEY, "com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager");
config.subset(STORAGE_NAMESPACE).addProperty(STORAGE_DIRECTORY_KEY, StorageSetup.getHomeDir());
// Add index
Configuration sub = config.subset(STORAGE_NAMESPACE).subset(INDEX_NAMESPACE).subset(INDEX);
sub.setProperty(INDEX_BACKEND_KEY, "com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex");
sub.setProperty(LOCAL_MODE_KEY, true);
sub.setProperty(CLIENT_ONLY_KEY, false);
sub.setProperty(STORAGE_DIRECTORY_KEY, StorageSetup.getHomeDir("es"));
// System.out.println(GraphDatabaseConfiguration.toString(config));
return config;
}
use of org.apache.commons.configuration.BaseConfiguration in project titan by thinkaurelius.
the class CassandraStorageSetup method getGenericCassandraStorageConfiguration.
public static Configuration getGenericCassandraStorageConfiguration(String ks) {
BaseConfiguration config = new BaseConfiguration();
config.addProperty(KEYSPACE_KEY, cleanKeyspaceName(ks));
config.addProperty(GraphDatabaseConfiguration.CONNECTION_TIMEOUT_KEY, 60000L);
return config;
}
Aggregations