jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject jena git commit: Make TDB2 loader placeholder safer.
Date Wed, 21 Mar 2018 13:52:01 GMT
Repository: jena
Updated Branches:
  refs/heads/master 6a68d3f29 -> 62ca369b8


Make TDB2 loader placeholder safer.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/62ca369b
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/62ca369b
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/62ca369b

Branch: refs/heads/master
Commit: 62ca369b8d97568e3751330e4b510ffec76c28fd
Parents: 6a68d3f
Author: Andy Seaborne <andy@apache.org>
Authored: Wed Mar 21 13:51:56 2018 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed Mar 21 13:51:56 2018 +0000

----------------------------------------------------------------------
 .../org/apache/jena/tdb2/loader/Loader.java     | 48 ++++++++++----------
 1 file changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/62ca369b/jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/loader/Loader.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/loader/Loader.java b/jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/loader/Loader.java
index 3b97757..a465e52 100644
--- a/jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/loader/Loader.java
+++ b/jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/loader/Loader.java
@@ -27,18 +27,19 @@ import org.apache.jena.riot.system.ProgressStreamRDF ;
 import org.apache.jena.riot.system.StreamRDF ;
 import org.apache.jena.riot.system.StreamRDFLib ;
 import org.apache.jena.tdb2.store.DatasetGraphTDB;
+import org.apache.jena.tdb2.sys.TDBInternal;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 
 public class Loader {
     
-    private static final int BATCH_SIZE = 100 ;
-    
-    // XXX StreamRDFBatchSplit and parallel index update.
-    private static Logger LOG = LoggerFactory.getLogger("Loader") ;
+//    private static final int BATCH_SIZE = 100 ;
+//    
+//    // XXX StreamRDFBatchSplit and parallel index update.
+//    private static Logger LOG = LoggerFactory.getLogger("Loader") ;
     
     public static void bulkLoad(Dataset ds, String ... files) {
-        DatasetGraphTDB dsg = (DatasetGraphTDB)ds.asDatasetGraph() ;
+        DatasetGraphTDB dsg = TDBInternal.getDatasetGraphTDB(ds);
         StreamRDF s1 = StreamRDFLib.dataset(dsg) ;
         ProgressMonitor plog = ProgressMonitor.create(LOG, "Triples", 100000, 10) ;
         ProgressStreamRDF sMonitor = new ProgressStreamRDF(s1, plog) ;
@@ -56,23 +57,22 @@ public class Loader {
         plog.finishMessage();
     }
     
-    public static void bulkLoadBatching(Dataset ds, String ... files) {
-        DatasetGraphTDB dsg = (DatasetGraphTDB)ds.asDatasetGraph() ;
-
-        StreamRDFBatchSplit s1 = new StreamRDFBatchSplit(dsg, 10) ;
-        ProgressMonitor plog = ProgressMonitor.create(LOG, "Triples", 100000, BATCH_SIZE)
;
-        // Want the monitor on the outside to capture transaction wrapper costs.
-        StreamRDF s3 = new ProgressStreamRDF(s1, plog) ;
-
-        plog.start(); 
-        Txn.executeWrite(ds, () -> {
-            for ( String fn : files ) {
-                if ( files.length > 1 )
-                    FmtLog.info(LOG, "File: %s",fn);
-                RDFDataMgr.parse(s3, fn) ;
-            }
-        }) ;
-        plog.finish();  
-        plog.finishMessage();
-    }
+//    public static void bulkLoadBatching(Dataset ds, String ... files) {
+//        DatasetGraphTDB dsg = TDBInternal.getDatasetGraphTDB(ds);
+//        StreamRDFBatchSplit s1 = new StreamRDFBatchSplit(dsg, 10) ;
+//        ProgressMonitor plog = ProgressMonitor.create(LOG, "Triples", 100000, BATCH_SIZE)
;
+//        // Want the monitor on the outside to capture transaction wrapper costs.
+//        StreamRDF s3 = new ProgressStreamRDF(s1, plog) ;
+//
+//        plog.start(); 
+//        Txn.executeWrite(ds, () -> {
+//            for ( String fn : files ) {
+//                if ( files.length > 1 )
+//                    FmtLog.info(LOG, "File: %s",fn);
+//                RDFDataMgr.parse(s3, fn) ;
+//            }
+//        }) ;
+//        plog.finish();  
+//        plog.finishMessage();
+//    }
 }


Mime
View raw message