Search in sources :

Example 11 with ModifiableConfiguration

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;
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) CommonsConfiguration(org.janusgraph.diskstorage.configuration.backend.CommonsConfiguration) ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 12 with ModifiableConfiguration

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;
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 13 with ModifiableConfiguration

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;
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 14 with ModifiableConfiguration

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);
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 15 with ModifiableConfiguration

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;
}
Also used : HashMap(java.util.HashMap) ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration) JanusGraphFactory(org.janusgraph.core.JanusGraphFactory)

Aggregations

ModifiableConfiguration (org.janusgraph.diskstorage.configuration.ModifiableConfiguration)62 Test (org.junit.Test)16 BaseConfiguration (org.apache.commons.configuration.BaseConfiguration)10 CommonsConfiguration (org.janusgraph.diskstorage.configuration.backend.CommonsConfiguration)10 KeyColumnValueStoreTest (org.janusgraph.diskstorage.KeyColumnValueStoreTest)6 BasicConfiguration (org.janusgraph.diskstorage.configuration.BasicConfiguration)5 Configuration (org.janusgraph.diskstorage.configuration.Configuration)5 GraphDatabaseConfiguration (org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration)5 HashMap (java.util.HashMap)3 Map (java.util.Map)3 StandardBaseTransactionConfig (org.janusgraph.diskstorage.util.StandardBaseTransactionConfig)3 WriteConfiguration (org.janusgraph.diskstorage.configuration.WriteConfiguration)2 InMemoryStoreManager (org.janusgraph.diskstorage.keycolumnvalue.inmemory.InMemoryStoreManager)2 IndexRemoveJob (org.janusgraph.graphdb.olap.job.IndexRemoveJob)2 IndexRepairJob (org.janusgraph.graphdb.olap.job.IndexRepairJob)2 CassandraHadoopScanRunner (org.janusgraph.hadoop.scan.CassandraHadoopScanRunner)2 HBaseHadoopScanRunner (org.janusgraph.hadoop.scan.HBaseHadoopScanRunner)2 Before (org.junit.Before)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 IOException (java.io.IOException)1