private static AccumuloRyaDAO getRyaIndexer(final Configuration conf) throws IOException { try { if (!conf.getBoolean(ENABLE_CORE, true)) { return null; } final AccumuloRyaDAO ryaIndexer = new AccumuloRyaDAO(); final Connector conn = ConfigUtils.getConnector(conf); ryaIndexer.setConnector(conn); final AccumuloRdfConfiguration ryaConf = new AccumuloRdfConfiguration(); final String tablePrefix = conf.get(OUTPUT_PREFIX_PROPERTY, null); if (tablePrefix != null) { ryaConf.setTablePrefix(tablePrefix); } ryaConf.setDisplayQueryPlan(false); ryaIndexer.setConf(ryaConf); ryaIndexer.init(); return ryaIndexer; } catch (final AccumuloException e) { logger.error("Cannot create RyaIndexer", e); throw new IOException(e); } catch (final AccumuloSecurityException e) { logger.error("Cannot create RyaIndexer", e); throw new IOException(e); } catch (final RyaDAOException e) { logger.error("Cannot create RyaIndexer", e); throw new IOException(e); } }
private static AccumuloRyaDAO getRyaIndexer(final Configuration conf) throws IOException { try { if (!conf.getBoolean(ENABLE_CORE, true)) { return null; } final AccumuloRyaDAO ryaIndexer = new AccumuloRyaDAO(); final Connector conn = ConfigUtils.getConnector(conf); ryaIndexer.setConnector(conn); final AccumuloRdfConfiguration ryaConf = new AccumuloRdfConfiguration(); final String tablePrefix = conf.get(OUTPUT_PREFIX_PROPERTY, null); if (tablePrefix != null) { ryaConf.setTablePrefix(tablePrefix); } ryaConf.setDisplayQueryPlan(false); ryaIndexer.setConf(ryaConf); ryaIndexer.init(); return ryaIndexer; } catch (final AccumuloException e) { logger.error("Cannot create RyaIndexer", e); throw new IOException(e); } catch (final AccumuloSecurityException e) { logger.error("Cannot create RyaIndexer", e); throw new IOException(e); } catch (final RyaDAOException e) { logger.error("Cannot create RyaIndexer", e); throw new IOException(e); } }
private static AccumuloRdfConfiguration getConf() { AccumuloRdfConfiguration conf; Set<RyaIRI> propertySet = new HashSet<RyaIRI>(Arrays.asList(new RyaIRI("http://createdBy"), new RyaIRI("http://createdOn"), new RyaIRI("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; }
conf.setDisplayQueryPlan(true);
@Override public Sail getSail(final SailImplConfig config) throws SailConfigException { try { final RdfCloudTripleStore store = new RdfCloudTripleStore(); final RyaAccumuloSailConfig cbconfig = (RyaAccumuloSailConfig) config; final String instanceName = cbconfig.getInstance(); final String zooKeepers = cbconfig.getZookeepers(); Instance i; if (cbconfig.isMock()) { i = new MockInstance(instanceName); } else { i = new ZooKeeperInstance(instanceName, zooKeepers); } final String user = cbconfig.getUser(); final String pass = cbconfig.getPassword(); final Connector connector = i.getConnector(user, new PasswordToken(pass)); final AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); crdfdao.setConnector(connector); final AccumuloRdfConfiguration conf = cbconfig.toRdfConfiguation(); ConfigUtils.setIndexers(conf); conf.setDisplayQueryPlan(true); crdfdao.setConf(conf); crdfdao.init(); store.setRyaDAO(crdfdao); return store; } catch (RyaDAOException | AccumuloException | AccumuloSecurityException e) { throw new SailConfigException(e); } }
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; }
@Override public Sail getSail(final SailImplConfig config) throws SailConfigException { try { final RdfCloudTripleStore store = new RdfCloudTripleStore(); final RyaAccumuloSailConfig cbconfig = (RyaAccumuloSailConfig) config; final String instanceName = cbconfig.getInstance(); final String zooKeepers = cbconfig.getZookeepers(); Instance i; if (cbconfig.isMock()) { i = new MockInstance(instanceName); } else { i = new ZooKeeperInstance(instanceName, zooKeepers); } final String user = cbconfig.getUser(); final String pass = cbconfig.getPassword(); final Connector connector = i.getConnector(user, new PasswordToken(pass)); final AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); crdfdao.setConnector(connector); final AccumuloRdfConfiguration conf = cbconfig.toRdfConfiguation(); ConfigUtils.setIndexers(conf); conf.setDisplayQueryPlan(true); crdfdao.setConf(conf); crdfdao.init(); store.setRyaDAO(crdfdao); return store; } catch (RyaDAOException | AccumuloException | AccumuloSecurityException e) { throw new SailConfigException(e); } }
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; }
conf.setDisplayQueryPlan(true); conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, false); conf.set(ConfigUtils.CLOUDBASE_USER, clusterInstance.getUsername());
conf.setDisplayQueryPlan(true); conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, false); conf.set(ConfigUtils.CLOUDBASE_USER, clusterInstance.getUsername());