jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1228641 - in /incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb: TDBLoader.java store/bulkloader/BulkLoader.java store/bulkloader/LoaderNodeTupleTable.java
Date Sat, 07 Jan 2012 15:58:21 GMT
Author: andy
Date: Sat Jan  7 15:58:20 2012
New Revision: 1228641

URL: http://svn.apache.org/viewvc?rev=1228641&view=rev
Log:
JENA-102

Modified:
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/TDBLoader.java
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/BulkLoader.java
    incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/TDBLoader.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/TDBLoader.java?rev=1228641&r1=1228640&r2=1228641&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/TDBLoader.java (original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/TDBLoader.java Sat Jan
 7 15:58:20 2012
@@ -76,8 +76,7 @@ public class TDBLoader
     }
     
     /** Load the contents of URL into a dataset.  Input is NQUADS.
-     *  To load a triples format, use @link{#load(GraphTDB, List<String>, boolean)}

-     *  or @link{#loadTriples(DatasetGraphTDB, List<String>, boolean)} 
+     *  To load a triples format, use {@link #loadGraph} 
     */
     public static void load(DatasetGraphTDB dataset, InputStream input, boolean showProgress)
     {

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/BulkLoader.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/BulkLoader.java?rev=1228641&r1=1228640&r2=1228641&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/BulkLoader.java
(original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/BulkLoader.java
Sat Jan  7 15:58:20 2012
@@ -260,6 +260,8 @@ public class BulkLoader
         Destination<Quad> sink = new Destination<Quad>() {
             long count = 0 ;
             private StatsCollector stats ;
+            private boolean startedEmpty = dsg.isEmpty() ;
+            
             @Override
             final public void start()
             {
@@ -304,7 +306,7 @@ public class BulkLoader
 
                 loaderTriples.loadFinish() ;
                 loaderQuads.loadFinish() ;
-                if ( ! dsg.getLocation().isMem() )
+                if ( ! dsg.getLocation().isMem() && startedEmpty )
                 {
                     String filename = dsg.getLocation().getPath(Names.optStats) ;
                     Stats.write(filename, stats) ;

Modified: incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java?rev=1228641&r1=1228640&r2=1228641&view=diff
==============================================================================
--- incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
(original)
+++ incubator/jena/Jena2/TDB/trunk/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
Sat Jan  7 15:58:20 2012
@@ -42,7 +42,6 @@ public class LoaderNodeTupleTable implem
 {
     private LoadMonitor monitor          = null ;
     private boolean doIncremental   = false ;
-    private boolean generateStats   = false ;
 
     private int          numIndexes ; 
     private TupleIndex   primaryIndex ;
@@ -62,7 +61,6 @@ public class LoaderNodeTupleTable implem
         this.nodeTupleTable = nodeTupleTable ;
         this.monitor = monitor ;
         this.doIncremental = false ;        // Until we know it's safe.
-        this.generateStats = false ;
         this.itemsName = itemsName ;          // "triples", "quads", "tuples" (plural)
     }
 
@@ -83,26 +81,16 @@ public class LoaderNodeTupleTable implem
         else
         {
             monitor.print("** Load into %s table with existing data", itemsName) ;
-            generateStats = false ;
         }
-
-        if ( generateStats )
-            statsPrepare() ;
     }
         
     protected void loadSecondaryIndexes()
     {
-        if ( generateStats )
-            statsFinalize() ;
-
         if ( dropAndRebuildIndexes )
             // Now do secondary indexes.
             createSecondaryIndexes() ;
     }
 
-    protected void statsPrepare() {}
-    protected void statsFinalize() {}
-
     public void loadStart()     { monitor.startLoad() ; }
     public void loadFinish()    { monitor.finishLoad() ; }
     
@@ -122,7 +110,7 @@ public class LoaderNodeTupleTable implem
             nodeTupleTable.addRow(nodes) ;
 
 //            // Flush every so often.
-//            // Seems to improve performance:maybe because a bunch of blcoks are
+//            // Seems to improve performance:maybe because a bunch of blocks are
 //            // flushed together meaning better disk access pattern 
 //            if ( LoadFlushTickPrimary > 0 &&  count % LoadFlushTickPrimary ==
0 )
 //            {



Mime
View raw message