예제 #1
0
 @Override
 public void start() {
   log.info("Batch size: " + batchSize);
   // Multiple starts in one trnasaciton are possible.
   if (txn == null) txn = dsg.getTxnSystem().getThreadTransaction();
   if (txn == null) throw new TDBException("Not in a transaction");
 }
예제 #2
0
  private static void batchUpdateIndexes(
      DatasetGraphTDB dsg,
      TDBDatasetDetails details,
      List<Triple> batchTriples,
      List<Tuple<NodeId>> workspace) {
    List<Tuple<NodeId>> tuples = workspace;
    if (tuples == null) tuples = new ArrayList<>(batchTriples.size());

    convert(batchTriples, tuples, details.ntTop);
    // log.info("Batch triples: "+tuples.size()) ;

    TupleTable tupleTable = dsg.getTripleTable().getNodeTupleTable().getTupleTable();
    tupleTable.addAll(tuples);
  }
예제 #3
0
 private static void incrementalUpdateIndexes(List<Triple> triples, DatasetGraphTDB dsg) {
   for (Triple triple : triples) {
     dsg.getTripleTable().add(triple);
   }
 }