use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.
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(com.thinkaurelius.titan.graphdb.olap.job.IndexUpdateJob.INDEX_NAME, indexName);
mc.set(com.thinkaurelius.titan.graphdb.olap.job.IndexUpdateJob.INDEX_RELATION_TYPE, relationType);
mc.set(GraphDatabaseConfiguration.JOB_START_TIME, System.currentTimeMillis());
return mc;
}
use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.
the class MapReduceIndexJobs method hbaseRepair.
public static ScanMetrics hbaseRepair(Properties titanProperties, 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, titanProperties);
cr.scanJobConf(mc);
cr.scanJobConfRoot(GraphDatabaseConfiguration.class.getName() + "#JOB_NS");
cr.baseHadoopConf(hadoopBaseConf);
return cr.run();
}
use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.
the class BerkeleyLuceneTest method getConfiguration.
@Override
public WriteConfiguration getConfiguration() {
ModifiableConfiguration config = getBerkeleyJEConfiguration();
//Add index
config.set(INDEX_BACKEND, "lucene", INDEX);
config.set(INDEX_DIRECTORY, StorageSetup.getHomeDir("lucene"), INDEX);
return config.getConfiguration();
}
use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.
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.getMiniCluster().getZkServer().getZkAddress(), INDEX);
config.set(SolrIndex.WAIT_SEARCHER, true, INDEX);
//TODO: set SOLR specific config options
return config.getConfiguration();
}
use of com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration in project titan by thinkaurelius.
the class SolrIndexTest method getLocalSolrTestConfig.
private Configuration getLocalSolrTestConfig() {
final String index = "solr";
ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
config.set(SolrIndex.ZOOKEEPER_URL, SolrRunner.getMiniCluster().getZkServer().getZkAddress(), index);
config.set(SolrIndex.WAIT_SEARCHER, true, index);
return config.restrictTo(index);
}
Aggregations