@Override final public void startBulk() { loaderTriples.loadStart() ; loaderTriples.loadDataStart() ; this.stats = new StatsCollector() ; }
@Override final public void finishBulk() { loaderTriples.loadDataFinish() ; loaderTriples.loadIndexStart() ; loaderTriples.loadIndexFinish() ; loaderTriples.loadFinish() ; if ( ! dsg.getLocation().isMem() && startedEmpty ) { String filename = dsg.getLocation().getPath(Names.optStats) ; Stats.write(filename, stats.results()) ; } forceSync(dsg) ; }
DestinationTripleGraph(final DatasetGraphTDB dsg, RdfImportFilter importFilter, Logger log) { this.dsg = dsg ; startedEmpty = dsg.isEmpty() ; monitor = new LoadMonitor(dsg, log, "triples", BulkLoader.DataTickPoint, BulkLoader.IndexTickPoint) ; loaderTriples = new LoaderNodeTupleTable(dsg.getTripleTable().getNodeTupleTable(), "triples", monitor) ; if(importFilter == null){ this.importFilter = NO_FILTER; } else { this.importFilter = importFilter; } this.importLog = log; }
private void triple(Node s, Node p, Node o){ if(importFilter.accept(s, p, o)){ loaderTriples.load(s, p, o); stats.record(null, s, p, o); count++; } else { filteredCount++; if(filteredCount%100000 == 0){ importLog.info("Filtered: {} triples ({}%)",filteredCount, ((double)filteredCount*100/(double)(filteredCount+count))); } } } @Override
@Override final public void finishBulk() { loaderTriples.loadDataFinish() ; loaderTriples.loadIndexStart() ; loaderTriples.loadIndexFinish() ; loaderTriples.loadFinish() ; if ( ! dsg.getLocation().isMem() && startedEmpty ) { String filename = dsg.getLocation().getPath(Names.optStats) ; Stats.write(filename, stats.results()) ; } forceSync(dsg) ; }
DestinationTripleGraph(final DatasetGraphTDB dsg, RdfImportFilter importFilter, Logger log) { this.dsg = dsg ; startedEmpty = dsg.isEmpty() ; monitor = new LoadMonitor(dsg, log, "triples", BulkLoader.DataTickPoint, BulkLoader.IndexTickPoint) ; loaderTriples = new LoaderNodeTupleTable(dsg.getTripleTable().getNodeTupleTable(), "triples", monitor) ; if(importFilter == null){ this.importFilter = NO_FILTER; } else { this.importFilter = importFilter; } this.importLog = log; }
private void triple(Node s, Node p, Node o){ if(importFilter.accept(s, p, o)){ loaderTriples.load(s, p, o); stats.record(null, s, p, o); count++; } else { filteredCount++; if(filteredCount%100000 == 0){ importLog.info("Filtered: {} triples ({}%)",filteredCount, ((double)filteredCount*100/(double)(filteredCount+count))); } } } @Override
@Override final public void startBulk() { loaderTriples.loadStart() ; loaderTriples.loadDataStart() ; this.stats = new StatsCollector() ; }