use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class AccumuloIndexSetColumnVisibilityTest method getConf.
private static Configuration getConf() {
final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, ryaInstanceName);
conf.set(ConfigUtils.CLOUDBASE_USER, "root");
conf.set(ConfigUtils.CLOUDBASE_PASSWORD, "password");
conf.set(ConfigUtils.CLOUDBASE_INSTANCE, instance);
conf.set(ConfigUtils.CLOUDBASE_ZOOKEEPERS, zooKeepers);
conf.set(RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, "U,USA");
return conf;
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class AccumuloDocIndexerTest method init.
@Before
public void init() throws Exception {
final String INSTANCE = "instance";
Configuration config = new Configuration();
config.set(ConfigUtils.CLOUDBASE_AUTHS, "U");
config.set(ConfigUtils.CLOUDBASE_INSTANCE, INSTANCE);
config.set(ConfigUtils.CLOUDBASE_USER, "root");
config.set(ConfigUtils.CLOUDBASE_PASSWORD, "");
conf = new AccumuloRdfConfiguration(config);
conf.set(ConfigUtils.USE_MOCK_INSTANCE, "true");
conf.setAdditionalIndexers(EntityCentricIndex.class);
conf.setTablePrefix("EntityCentric_");
tableName = EntityCentricIndex.getTableName(conf);
// Access the accumulo instance. If you assign a name, it persists statically, but otherwise, can't get it by name.
accCon = new MockInstance(INSTANCE).getConnector("root", new PasswordToken(""));
if (accCon.tableOperations().exists(tableName)) {
throw new Exception("New mock accumulo already has a table! Should be deleted in AfterTest.");
}
// This should happen in the index initialization, but some tests need it before:
accCon.tableOperations().create(tableName);
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class AccumuloStatementMetadataOptimizerIT method getConf.
private static RdfCloudTripleStoreConfiguration getConf() {
RdfCloudTripleStoreConfiguration conf;
Set<RyaURI> propertySet = new HashSet<RyaURI>(Arrays.asList(new RyaURI("http://createdBy"), new RyaURI("http://createdOn")));
conf = new AccumuloRdfConfiguration();
conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, true);
conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, "rya_");
conf.set(ConfigUtils.CLOUDBASE_USER, "root");
conf.set(ConfigUtils.CLOUDBASE_PASSWORD, "");
conf.set(ConfigUtils.CLOUDBASE_INSTANCE, "instance");
conf.set(ConfigUtils.CLOUDBASE_AUTHS, "");
conf.setUseStatementMetadata(true);
conf.setStatementMetadataProperties(propertySet);
return conf;
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class StatementMetadataExample method getConf.
private static AccumuloRdfConfiguration getConf() {
AccumuloRdfConfiguration conf;
Set<RyaURI> propertySet = new HashSet<RyaURI>(Arrays.asList(new RyaURI("http://createdBy"), new RyaURI("http://createdOn"), new RyaURI("http://hasTimeStamp")));
conf = new AccumuloRdfConfiguration();
conf.setDisplayQueryPlan(false);
conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, true);
conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, "rya_");
conf.set(ConfigUtils.CLOUDBASE_USER, "root");
conf.set(ConfigUtils.CLOUDBASE_PASSWORD, "");
conf.set(ConfigUtils.CLOUDBASE_INSTANCE, "instance");
conf.set(ConfigUtils.CLOUDBASE_AUTHS, "");
conf.setUseStatementMetadata(true);
conf.setStatementMetadataProperties(propertySet);
return conf;
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class QueryBenchmark method setup.
@Setup
public void setup() throws Exception {
// Setup logging.
final ConsoleAppender console = new ConsoleAppender();
console.setLayout(new PatternLayout("%d [%p|%c|%C{1}] %m%n"));
console.setThreshold(Level.INFO);
console.activateOptions();
Logger.getRootLogger().addAppender(console);
// Load the benchmark's configuration file.
final InputStream queriesStream = Files.newInputStream(QUERY_BENCHMARK_CONFIGURATION_FILE);
final QueriesBenchmarkConf benchmarkConf = new QueriesBenchmarkConfReader().load(queriesStream);
// Create the Rya Configuration object using the benchmark's configuration.
final AccumuloRdfConfiguration ryaConf = new AccumuloRdfConfiguration();
final Rya rya = benchmarkConf.getRya();
ryaConf.setTablePrefix(rya.getRyaInstanceName());
final Accumulo accumulo = rya.getAccumulo();
ryaConf.set(ConfigUtils.CLOUDBASE_USER, accumulo.getUsername());
ryaConf.set(ConfigUtils.CLOUDBASE_PASSWORD, accumulo.getPassword());
ryaConf.set(ConfigUtils.CLOUDBASE_ZOOKEEPERS, accumulo.getZookeepers());
ryaConf.set(ConfigUtils.CLOUDBASE_INSTANCE, accumulo.getInstanceName());
// Print the query plan so that you can visually inspect how PCJs are being applied for each benchmark.
ryaConf.set(ConfigUtils.DISPLAY_QUERY_PLAN, "true");
// Turn on PCJs if we are configured to use them.
final SecondaryIndexing secondaryIndexing = rya.getSecondaryIndexing();
if (secondaryIndexing.isUsePCJ()) {
ryaConf.set(ConfigUtils.USE_PCJ, "true");
ryaConf.set(ConfigUtils.PCJ_STORAGE_TYPE, PrecomputedJoinStorageType.ACCUMULO.toString());
ryaConf.set(ConfigUtils.PCJ_UPDATER_TYPE, PrecomputedJoinUpdaterType.NO_UPDATE.toString());
} else {
ryaConf.set(ConfigUtils.USE_PCJ, "false");
}
// Create the connections used to execute the benchmark.
sail = RyaSailFactory.getInstance(ryaConf);
sailConn = sail.getConnection();
}
Aggregations