static Map<String, TupleIndex> indexMap(DatasetGraphTDB dsgtdb) { Map<String, TupleIndex> indexMap = new HashMap<>(); // All triple/quad indexes. Arrays.stream(dsgtdb.getTripleTable().getNodeTupleTable().getTupleTable().getIndexes()) .forEach(idx->indexMap.put(idx.getName(), idx)); Arrays.stream(dsgtdb.getQuadTable().getNodeTupleTable().getTupleTable().getIndexes()) .forEach(idx->indexMap.put(idx.getName(), idx)); return indexMap; }
private void dropSecondaryIndexes() { numIndexes = nodeTupleTable.getTupleTable().numIndexes(); primaryIndex = nodeTupleTable.getTupleTable().getIndex(0); secondaryIndexes = ArrayUtils.alloc(TupleIndex.class, numIndexes-1); System.arraycopy(nodeTupleTable.getTupleTable().getIndexes(), 1, secondaryIndexes, 0, numIndexes-1); // Set non-primary indexes to null. for ( int i = 1; i < numIndexes; i++ ) nodeTupleTable.getTupleTable().setTupleIndex(i, null); }
public TDBDatasetDetails(DatasetGraphTDB dsg) { ntTop = dsg.getTripleTable().getNodeTupleTable().getNodeTable() ; tripleIndexes = ArrayUtils.copy(dsg.getTripleTable().getNodeTupleTable().getTupleTable().getIndexes()) ; quadIndexes = ArrayUtils.copy(dsg.getQuadTable().getNodeTupleTable().getTupleTable().getIndexes()) ; fillInNodeTableDetails() ; fillInIndexDetails() ; }
@Override public void startBulk() { TransactionCoordinator coordinator = CoLib.newCoordinator(); NodeTupleTable p = prefixes.getNodeTupleTable(); CoLib.add(coordinator, p.getNodeTable()); CoLib.add(coordinator, p.getTupleTable().getIndexes()); coordinator.start(); transaction = coordinator.begin(TxnType.WRITE); }
@Override public void startBulk() { coordinator = CoLib.newCoordinator(); CoLib.add(coordinator, nodeTable); // Prefixes NodeTupleTable p = ((DatasetPrefixesTDB)prefixes).getNodeTupleTable(); CoLib.add(coordinator, p.getNodeTable()); CoLib.add(coordinator, p.getTupleTable().getIndexes()); CoLib.start(coordinator); transaction = coordinator.begin(TxnType.WRITE); }
@Override public void startBulk() { coordinator = CoLib.newCoordinator(); CoLib.add(coordinator, nodeTable); // Prefixes NodeTupleTable p = ((DatasetPrefixesTDB)prefixes).getNodeTupleTable(); CoLib.add(coordinator, p.getNodeTable()); CoLib.add(coordinator, p.getTupleTable().getIndexes()); CoLib.start(coordinator); transaction = coordinator.begin(TxnType.WRITE); }