Search in sources :

Example 6 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class InMemoryJanusGraphIoTest method getConfiguration.

public WriteConfiguration getConfiguration() {
    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "inmemory");
    return config.getConfiguration();
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 7 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class InMemoryOLAPTest method getConfiguration.

public WriteConfiguration getConfiguration() {
    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "inmemory");
    return config.getConfiguration();
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 8 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class SerializerGraphConfiguration method initialize.

@Before
public void initialize() {
    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "inmemory");
    config.set(GraphDatabaseConfiguration.CUSTOM_ATTRIBUTE_CLASS, TClass1.class.getName(), "attribute1");
    config.set(GraphDatabaseConfiguration.CUSTOM_SERIALIZER_CLASS, TClass1Serializer.class.getName(), "attribute1");
    config.set(GraphDatabaseConfiguration.CUSTOM_ATTRIBUTE_CLASS, TEnum.class.getName(), "attribute4");
    config.set(GraphDatabaseConfiguration.CUSTOM_SERIALIZER_CLASS, TEnumSerializer.class.getName(), "attribute4");
    graph = (StandardJanusGraph) JanusGraphFactory.open(config);
}
Also used : ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 9 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class ElasticSearchMultiTypeIndexTest method getESTestConfig.

public Configuration getESTestConfig() {
    final String index = "es";
    final CommonsConfiguration cc = new CommonsConfiguration(new BaseConfiguration());
    if (esr.getEsMajorVersion().value > 2) {
        cc.set("index." + index + ".elasticsearch.ingest-pipeline.ingestvertex", "pipeline_1");
    }
    final ModifiableConfiguration config = esr.setElasticsearchConfiguration(new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS, cc, BasicConfiguration.Restriction.NONE), index);
    config.set(USE_DEPRECATED_MULTITYPE_INDEX, true, index);
    config.set(GraphDatabaseConfiguration.INDEX_MAX_RESULT_SET_SIZE, 3, index);
    return config.restrictTo(index);
}
Also used : BaseConfiguration(org.apache.commons.configuration.BaseConfiguration) CommonsConfiguration(org.janusgraph.diskstorage.configuration.backend.CommonsConfiguration) ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

Example 10 with ModifiableConfiguration

use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.

the class MapReduceIndexJobs method hbaseRepair.

public static ScanMetrics hbaseRepair(Properties janusgraphProperties, String indexName, String relationType, Configuration hadoopBaseConf) throws InterruptedException, IOException, ClassNotFoundException {
    IndexRepairJob job = new IndexRepairJob();
    HBaseHadoopScanRunner cr = new HBaseHadoopScanRunner(job);
    ModifiableConfiguration mc = getIndexJobConf(indexName, relationType);
    copyPropertiesToInputAndOutputConf(hadoopBaseConf, janusgraphProperties);
    cr.scanJobConf(mc);
    cr.scanJobConfRoot(GraphDatabaseConfiguration.class.getName() + "#JOB_NS");
    cr.baseHadoopConf(hadoopBaseConf);
    return cr.run();
}
Also used : IndexRepairJob(org.janusgraph.graphdb.olap.job.IndexRepairJob) HBaseHadoopScanRunner(org.janusgraph.hadoop.scan.HBaseHadoopScanRunner) ModifiableConfiguration(org.janusgraph.diskstorage.configuration.ModifiableConfiguration)

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