use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class MapReduceIndexJobs method getIndexJobConf.
private static ModifiableConfiguration getIndexJobConf(String indexName, String relationType) {
ModifiableConfiguration mc = new ModifiableConfiguration(GraphDatabaseConfiguration.JOB_NS, new CommonsConfiguration(new BaseConfiguration()), BasicConfiguration.Restriction.NONE);
mc.set(org.janusgraph.graphdb.olap.job.IndexUpdateJob.INDEX_NAME, indexName);
mc.set(org.janusgraph.graphdb.olap.job.IndexUpdateJob.INDEX_RELATION_TYPE, relationType);
mc.set(GraphDatabaseConfiguration.JOB_START_TIME, System.currentTimeMillis());
return mc;
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class HBaseStorageSetup method getHBaseConfiguration.
public static ModifiableConfiguration getHBaseConfiguration(String tableName, String graphName) {
ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "hbase");
if (!StringUtils.isEmpty(tableName))
config.set(HBaseStoreManager.HBASE_TABLE, tableName);
if (!StringUtils.isEmpty(graphName))
config.set(GraphDatabaseConfiguration.GRAPH_NAME, graphName);
config.set(GraphDatabaseConfiguration.TIMESTAMP_PROVIDER, HBaseStoreManager.PREFERRED_TIMESTAMPS);
config.set(GraphDatabaseConfiguration.TIMESTAMP_PROVIDER, HBaseStoreManager.PREFERRED_TIMESTAMPS);
config.set(SimpleBulkPlacementStrategy.CONCURRENT_PARTITIONS, 1);
config.set(GraphDatabaseConfiguration.DROP_ON_CLEAR, false);
return config;
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class HBaseGraphComputerProvider method getJanusGraphConfiguration.
@Override
public ModifiableConfiguration getJanusGraphConfiguration(String graphName, Class<?> test, String testMethodName) {
ModifiableConfiguration config = super.getJanusGraphConfiguration(graphName, test, testMethodName);
config.setAll(HBaseStorageSetup.getHBaseConfiguration(graphName).getAll());
return config;
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class SolrIndexTest method getLocalSolrTestConfig.
private Configuration getLocalSolrTestConfig() {
final String index = "solr";
final ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
config.set(SolrIndex.ZOOKEEPER_URL, SolrRunner.getZookeeperUrls(), index);
config.set(SolrIndex.WAIT_SEARCHER, true, index);
config.set(GraphDatabaseConfiguration.INDEX_MAX_RESULT_SET_SIZE, 3, index);
return config.restrictTo(index);
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class AbstractJanusGraphProvider method getBaseConfiguration.
@Override
public Map<String, Object> getBaseConfiguration(String graphName, Class<?> test, String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
ModifiableConfiguration conf = getJanusGraphConfiguration(graphName, test, testMethodName);
conf.set(GraphDatabaseConfiguration.COMPUTER_RESULT_MODE, "persist");
conf.set(GraphDatabaseConfiguration.AUTO_TYPE, "tp3");
Map<String, Object> result = new HashMap<>();
conf.getAll().forEach((key, value) -> result.put(ConfigElement.getPath(key.element, key.umbrellaElements), value));
result.put(Graph.GRAPH, JanusGraphFactory.class.getName());
return result;
}
Aggregations