use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class MapReduceIndexJobs method cassandraRepair.
public static ScanMetrics cassandraRepair(Properties janusgraphProperties, String indexName, String relationType, String partitionerName, Configuration hadoopBaseConf) throws InterruptedException, IOException, ClassNotFoundException {
IndexRepairJob job = new IndexRepairJob();
CassandraHadoopScanRunner cr = new CassandraHadoopScanRunner(job);
ModifiableConfiguration mc = getIndexJobConf(indexName, relationType);
copyPropertiesToInputAndOutputConf(hadoopBaseConf, janusgraphProperties);
cr.partitionerOverride(partitionerName);
cr.scanJobConf(mc);
cr.scanJobConfRoot(GraphDatabaseConfiguration.class.getName() + "#JOB_NS");
cr.baseHadoopConf(hadoopBaseConf);
return cr.run();
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class MapReduceIndexJobs method cassandraRemove.
public static ScanMetrics cassandraRemove(Properties janusgraphProperties, String indexName, String relationType, String partitionerName, Configuration hadoopBaseConf) throws InterruptedException, IOException, ClassNotFoundException {
IndexRemoveJob job = new IndexRemoveJob();
CassandraHadoopScanRunner cr = new CassandraHadoopScanRunner(job);
ModifiableConfiguration mc = getIndexJobConf(indexName, relationType);
copyPropertiesToInputAndOutputConf(hadoopBaseConf, janusgraphProperties);
cr.partitionerOverride(partitionerName);
cr.scanJobConf(mc);
cr.scanJobConfRoot(GraphDatabaseConfiguration.class.getName() + "#JOB_NS");
cr.baseHadoopConf(hadoopBaseConf);
return cr.run();
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class HadoopVertexScanMapper method setup.
@Override
protected void setup(Context context) throws IOException, InterruptedException {
/* Don't call super implementation super.setup(context); */
org.apache.hadoop.conf.Configuration hadoopConf = DEFAULT_COMPAT.getContextConfiguration(context);
ModifiableHadoopConfiguration scanConf = ModifiableHadoopConfiguration.of(JanusGraphHadoopConfiguration.MAPRED_NS, hadoopConf);
VertexScanJob vertexScan = getVertexScanJob(scanConf);
ModifiableConfiguration graphConf = getJanusGraphConfiguration(context);
JanusGraph graph = JanusGraphFactory.open(graphConf);
job = VertexJobConverter.convert(graph, vertexScan);
metrics = new HadoopContextScanMetrics(context);
finishSetup(scanConf, graphConf);
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class LocalStoreManagerTest method getStoreManager.
public LocalStoreManager getStoreManager(Map<ConfigOption, String> map) throws BackendException {
final ModifiableConfiguration mc = new ModifiableConfiguration(ROOT_NS, new CommonsConfiguration(new BaseConfiguration()), NONE);
map.forEach(mc::set);
return new LocalStoreManagerSampleImplementation(mc);
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class BerkeleySolrTest method getConfiguration.
@Override
public WriteConfiguration getConfiguration() {
ModifiableConfiguration config = getBerkeleyJEConfiguration();
// Add index
config.set(INDEX_BACKEND, "solr", INDEX);
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);
// TODO: set SOLR specific config options
return config.getConfiguration();
}
Aggregations