@Override public String getNamespace(final String pfx) throws RyaDAOException { try { final Scanner scanner = connector.createScanner(tableLayoutStrategy.getNs(), ALL_AUTHORIZATIONS); scanner.fetchColumn(INFO_NAMESPACE_TXT, EMPTY_TEXT); scanner.setRange(new Range(new Text(pfx))); final Iterator<Map.Entry<Key, Value>> iterator = scanner .iterator(); if (iterator.hasNext()) { return new String(iterator.next().getValue().get(), StandardCharsets.UTF_8); } } catch (final Exception e) { throw new RyaDAOException(e); } return null; }
protected String[] getTables() { // core tables final List<String> tableNames = Lists.newArrayList( tableLayoutStrategy.getSpo(), tableLayoutStrategy.getPo(), tableLayoutStrategy.getOsp(), tableLayoutStrategy.getNs(), tableLayoutStrategy.getEval()); // Additional Tables for (final AccumuloIndexer index : secondaryIndexers) { tableNames.add(index.getTableName()); } return tableNames.toArray(new String[]{}); }
protected String[] getTables() { // core tables final List<String> tableNames = Lists.newArrayList( tableLayoutStrategy.getSpo(), tableLayoutStrategy.getPo(), tableLayoutStrategy.getOsp(), tableLayoutStrategy.getNs(), tableLayoutStrategy.getEval()); // Additional Tables for (final AccumuloIndexer index : secondaryIndexers) { tableNames.add(index.getTableName()); } return tableNames.toArray(new String[]{}); }
@Override public String getNamespace(final String pfx) throws RyaDAOException { try { final Scanner scanner = connector.createScanner(tableLayoutStrategy.getNs(), ALL_AUTHORIZATIONS); scanner.fetchColumn(INFO_NAMESPACE_TXT, EMPTY_TEXT); scanner.setRange(new Range(new Text(pfx))); final Iterator<Map.Entry<Key, Value>> iterator = scanner .iterator(); if (iterator.hasNext()) { return new String(iterator.next().getValue().get(), StandardCharsets.UTF_8); } } catch (final Exception e) { throw new RyaDAOException(e); } return null; }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public CloseableIteration<Namespace, RyaDAOException> iterateNamespace() throws RyaDAOException { try { final Scanner scanner = connector.createScanner(tableLayoutStrategy.getNs(), ALL_AUTHORIZATIONS); scanner.fetchColumnFamily(INFO_NAMESPACE_TXT); final Iterator<Map.Entry<Key, Value>> result = scanner.iterator(); return new AccumuloNamespaceTableIterator(result); } catch (final Exception e) { throw new RyaDAOException(e); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public CloseableIteration<Namespace, RyaDAOException> iterateNamespace() throws RyaDAOException { try { final Scanner scanner = connector.createScanner(tableLayoutStrategy.getNs(), ALL_AUTHORIZATIONS); scanner.fetchColumnFamily(INFO_NAMESPACE_TXT); final Iterator<Map.Entry<Key, Value>> result = scanner.iterator(); return new AccumuloNamespaceTableIterator(result); } catch (final Exception e) { throw new RyaDAOException(e); } }
tables.add( coreTableNames.getOsp() ); tables.add( coreTableNames.getEval() ); tables.add( coreTableNames.getNs() ); tables.add( coreTableNames.getProspects() ); tables.add( coreTableNames.getSelectivity() );
tables.add( coreTableNames.getOsp() ); tables.add( coreTableNames.getEval() ); tables.add( coreTableNames.getNs() ); tables.add( coreTableNames.getProspects() ); tables.add( coreTableNames.getSelectivity() );
public void setTableLayoutStrategy(final TableLayoutStrategy tableLayoutStrategy) { if (tableLayoutStrategy != null) { this.tableLayoutStrategy = tableLayoutStrategy; } else { this.tableLayoutStrategy = new TablePrefixLayoutStrategy(); //default } set(CONF_TBL_SPO, this.tableLayoutStrategy.getSpo()); set(CONF_TBL_PO, this.tableLayoutStrategy.getPo()); set(CONF_TBL_OSP, this.tableLayoutStrategy.getOsp()); set(CONF_TBL_NS, this.tableLayoutStrategy.getNs()); set(CONF_TBL_EVAL, this.tableLayoutStrategy.getEval()); }
public void setTableLayoutStrategy(final TableLayoutStrategy tableLayoutStrategy) { if (tableLayoutStrategy != null) { this.tableLayoutStrategy = tableLayoutStrategy; } else { this.tableLayoutStrategy = new TablePrefixLayoutStrategy(); //default } set(CONF_TBL_SPO, this.tableLayoutStrategy.getSpo()); set(CONF_TBL_PO, this.tableLayoutStrategy.getPo()); set(CONF_TBL_OSP, this.tableLayoutStrategy.getOsp()); set(CONF_TBL_NS, this.tableLayoutStrategy.getNs()); set(CONF_TBL_EVAL, this.tableLayoutStrategy.getEval()); }
AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getPo()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getOsp()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getNs()); bw_osp = mt_bw.getBatchWriter(tableLayoutStrategy.getOsp()); bw_ns = mt_bw.getBatchWriter(tableLayoutStrategy.getNs());
AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getPo()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getOsp()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getNs()); bw_osp = mt_bw.getBatchWriter(tableLayoutStrategy.getOsp()); bw_ns = mt_bw.getBatchWriter(tableLayoutStrategy.getNs());