use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class EntityTupleSet method getRyaSailConnection.
private RdfCloudTripleStoreConnection getRyaSailConnection() throws AccumuloException, AccumuloSecurityException, SailException {
RdfCloudTripleStore store = new RdfCloudTripleStore();
AccumuloRyaDAO crdfdao = new AccumuloRyaDAO();
crdfdao.setConnector(accCon);
AccumuloRdfConfiguration acc = new AccumuloRdfConfiguration(conf);
crdfdao.setConf(acc);
store.setRyaDAO(crdfdao);
store.initialize();
return (RdfCloudTripleStoreConnection) store.getConnection();
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class KafkaExportITBase method makeConfig.
protected AccumuloRdfConfiguration makeConfig(final String instanceName, final String zookeepers) {
final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
conf.setTablePrefix(RYA_INSTANCE_NAME);
// Accumulo connection information.
conf.setAccumuloUser(AccumuloExportITBase.ACCUMULO_USER);
conf.setAccumuloPassword(AccumuloExportITBase.ACCUMULO_PASSWORD);
conf.setAccumuloInstance(super.getAccumuloConnector().getInstance().getInstanceName());
conf.setAccumuloZookeepers(super.getAccumuloConnector().getInstance().getZooKeepers());
conf.setAuths("");
// PCJ configuration information.
conf.set(ConfigUtils.USE_PCJ, "true");
conf.set(ConfigUtils.USE_PCJ_UPDATER_INDEX, "true");
conf.set(ConfigUtils.FLUO_APP_NAME, super.getFluoConfiguration().getApplicationName());
conf.set(ConfigUtils.PCJ_STORAGE_TYPE, PrecomputedJoinIndexerConfig.PrecomputedJoinStorageType.ACCUMULO.toString());
conf.set(ConfigUtils.PCJ_UPDATER_TYPE, PrecomputedJoinIndexerConfig.PrecomputedJoinUpdaterType.FLUO.toString());
conf.setDisplayQueryPlan(true);
return conf;
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class HistoricStreamingVisibilityIT method makeConfig.
private AccumuloRdfConfiguration makeConfig() {
final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
conf.setTablePrefix(getRyaInstanceName());
// Accumulo connection information.
conf.set(ConfigUtils.CLOUDBASE_USER, getUsername());
conf.set(ConfigUtils.CLOUDBASE_PASSWORD, getPassword());
conf.set(ConfigUtils.CLOUDBASE_INSTANCE, super.getMiniAccumuloCluster().getInstanceName());
conf.set(ConfigUtils.CLOUDBASE_ZOOKEEPERS, super.getMiniAccumuloCluster().getZooKeepers());
conf.set(RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, "U,V,W");
return conf;
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class FluoITBase method setupRya.
/**
* Sets up a Rya instance.
*/
protected RyaSailRepository setupRya() throws AccumuloException, AccumuloSecurityException, RepositoryException, RyaDAOException, NumberFormatException, UnknownHostException, InferenceEngineException, AlreadyInitializedException, RyaDetailsRepositoryException, DuplicateInstanceNameException, RyaClientException, SailException {
checkNotNull(instanceName);
checkNotNull(zookeepers);
// Setup Rya configuration values.
final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
conf.setTablePrefix(getRyaInstanceName());
conf.setDisplayQueryPlan(true);
conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, false);
conf.set(ConfigUtils.CLOUDBASE_USER, clusterInstance.getUsername());
conf.set(ConfigUtils.CLOUDBASE_PASSWORD, clusterInstance.getPassword());
conf.set(ConfigUtils.CLOUDBASE_INSTANCE, clusterInstance.getInstanceName());
conf.set(ConfigUtils.CLOUDBASE_ZOOKEEPERS, clusterInstance.getZookeepers());
conf.set(ConfigUtils.USE_PCJ, "true");
conf.set(ConfigUtils.FLUO_APP_NAME, getRyaInstanceName());
conf.set(ConfigUtils.PCJ_STORAGE_TYPE, PrecomputedJoinIndexerConfig.PrecomputedJoinStorageType.ACCUMULO.toString());
conf.set(ConfigUtils.PCJ_UPDATER_TYPE, PrecomputedJoinIndexerConfig.PrecomputedJoinUpdaterType.FLUO.toString());
conf.set(ConfigUtils.CLOUDBASE_AUTHS, "");
// Install the test instance of Rya.
final Install install = new AccumuloInstall(createConnectionDetails(), accumuloConn);
final InstallConfiguration installConfig = InstallConfiguration.builder().setEnableTableHashPrefix(true).setEnableEntityCentricIndex(true).setEnableFreeTextIndex(true).setEnableTemporalIndex(true).setEnablePcjIndex(true).setEnableGeoIndex(true).setFluoPcjAppName(getRyaInstanceName()).build();
install.install(getRyaInstanceName(), installConfig);
// Connect to the instance of Rya that was just installed.
final Sail sail = RyaSailFactory.getInstance(conf);
final RyaSailRepository ryaRepo = new RyaSailRepository(sail);
return ryaRepo;
}
use of org.apache.rya.accumulo.AccumuloRdfConfiguration in project incubator-rya by apache.
the class EntityOptimizerTest method init.
@Before
public void init() throws RepositoryException, TupleQueryResultHandlerException, QueryEvaluationException, MalformedQueryException, AccumuloException, AccumuloSecurityException, TableExistsException {
accCon = new MockInstance("instance").getConnector("root", "".getBytes());
config = new BatchWriterConfig();
config.setMaxMemory(1000);
config.setMaxLatency(1000, TimeUnit.SECONDS);
config.setMaxWriteThreads(10);
if (accCon.tableOperations().exists("rya_prospects")) {
try {
accCon.tableOperations().delete("rya_prospects");
} catch (TableNotFoundException e) {
e.printStackTrace();
}
}
if (accCon.tableOperations().exists("rya_selectivity")) {
try {
accCon.tableOperations().delete("rya_selectivity");
} catch (TableNotFoundException e) {
e.printStackTrace();
}
}
accCon.tableOperations().create("rya_prospects");
accCon.tableOperations().create("rya_selectivity");
Configuration con = new Configuration();
con.set(ConfigUtils.CLOUDBASE_AUTHS, "U");
con.set(ConfigUtils.CLOUDBASE_INSTANCE, "instance");
con.set(ConfigUtils.CLOUDBASE_USER, "root");
con.set(ConfigUtils.CLOUDBASE_PASSWORD, "");
conf = new AccumuloRdfConfiguration(con);
TablePrefixLayoutStrategy tps = new TablePrefixLayoutStrategy("rya_");
conf.setTableLayoutStrategy(tps);
conf.set(ConfigUtils.USE_MOCK_INSTANCE, "true");
res = new ProspectorServiceEvalStatsDAO(accCon, conf);
}
Aggregations