public static Key from(TripleRow tripleRow) { return new Key(defaultTo(tripleRow.getRow(), EMPTY_BYTES), defaultTo(tripleRow.getColumnFamily(), EMPTY_BYTES), defaultTo(tripleRow.getColumnQualifier(), EMPTY_BYTES), defaultTo(tripleRow.getColumnVisibility(), EMPTY_BYTES), defaultTo(tripleRow.getTimestamp(), Long.MAX_VALUE)); }
private void writeRyaStatement(final RyaStatement ryaStatement, final Context context) throws TripleRowResolverException, IOException, InterruptedException { final Map<TABLE_LAYOUT, TripleRow> serialize = childRyaContext.getTripleResolver().serialize(ryaStatement); final TripleRow tripleRow = serialize.get(TABLE_LAYOUT.SPO); final Key key = AccumuloRdfUtils.from(tripleRow); final Value value = AccumuloRdfUtils.extractValue(tripleRow); context.write(key, value); } }
@Override public void init() throws RdfDAOException { try { if (isInitialized()) { throw new IllegalStateException("Already initialized"); } checkNotNull(connector); tableLayoutStrategy = conf.getTableLayoutStrategy(); // evalTable = conf.get(RdfCloudTripleStoreConfiguration.CONF_TBL_EVAL, evalTable); // conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_EVAL, evalTable); final TableOperations tos = connector.tableOperations(); AccumuloRdfUtils.createTableIfNotExist(tos, tableLayoutStrategy.getEval()); // boolean tableExists = tos.exists(evalTable); // if (!tableExists) // tos.create(evalTable); isInitialized.set(true); } catch (final Exception e) { throw new RdfDAOException(e); } }
@Override public void init() throws RdfDAOException { try { if (isInitialized()) { throw new IllegalStateException("Already initialized"); } checkNotNull(connector); tableLayoutStrategy = conf.getTableLayoutStrategy(); // evalTable = conf.get(RdfCloudTripleStoreConfiguration.CONF_TBL_EVAL, evalTable); // conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_EVAL, evalTable); final TableOperations tos = connector.tableOperations(); AccumuloRdfUtils.createTableIfNotExist(tos, tableLayoutStrategy.getEval()); // boolean tableExists = tos.exists(evalTable); // if (!tableExists) // tos.create(evalTable); isInitialized.set(true); } catch (final Exception e) { throw new RdfDAOException(e); } }
@Override public void init() throws RdfDAOException { try { if (isInitialized()) { throw new IllegalStateException("Already initialized"); } if (!resd.isInitialized()) { resd.init(); } checkNotNull(connector); tableLayoutStrategy = conf.getTableLayoutStrategy(); TableOperations tos = connector.tableOperations(); AccumuloRdfUtils.createTableIfNotExist(tos, tableLayoutStrategy.getSelectivity()); AccumuloRdfUtils.createTableIfNotExist(tos, tableLayoutStrategy.getProspects()); initialized = true; } catch (Exception e) { throw new RdfDAOException(e); } }
public static Key from(TripleRow tripleRow) { return new Key(defaultTo(tripleRow.getRow(), EMPTY_BYTES), defaultTo(tripleRow.getColumnFamily(), EMPTY_BYTES), defaultTo(tripleRow.getColumnQualifier(), EMPTY_BYTES), defaultTo(tripleRow.getColumnVisibility(), EMPTY_BYTES), defaultTo(tripleRow.getTimestamp(), Long.MAX_VALUE)); }
AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getSpo()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getPo()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getOsp()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getNs());
public static Value extractValue(TripleRow tripleRow) { return new Value(defaultTo(tripleRow.getValue(), EMPTY_BYTES)); }
AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getSpo()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getPo()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getOsp()); AccumuloRdfUtils.createTableIfNotExist(tableOperations, tableLayoutStrategy.getNs());
public static Value extractValue(TripleRow tripleRow) { return new Value(defaultTo(tripleRow.getValue(), EMPTY_BYTES)); }