From: <tho...@us...> - 2010-12-19 19:09:34
|
Revision: 4015 http://bigdata.svn.sourceforge.net/bigdata/?rev=4015&view=rev Author: thompsonbry Date: 2010-12-19 19:09:28 +0000 (Sun, 19 Dec 2010) Log Message: ----------- Modified the DataLoader to pass through the overridden properties with new DataLoader(properties,kb) rather than using AbstractTripleStore.getDataLoader(), which uses the defaults from the properties associated with the kb. Bug fix to incremental TM option. Modified to permit operations when no source files are specified (e.g., just do the closure). Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/DataLoader.java Modified: branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/DataLoader.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/DataLoader.java 2010-12-19 19:05:23 UTC (rev 4014) +++ branches/JOURNAL_HA_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/DataLoader.java 2010-12-19 19:09:28 UTC (rev 4015) @@ -860,7 +860,7 @@ // rdfFormat); loadFiles(totals, depth + 1, f, baseURI, rdfFormat, defaultGraph, filter, - (depth == 0 && i < files.length ? false : endOfBatch)); + (depth == 0 && i < (files.length-1) ? false : endOfBatch)); } @@ -1128,12 +1128,6 @@ */ public ClosureStats doClosure() { - if (buffer == null) - throw new IllegalStateException(); - - // flush anything in the buffer. - buffer.flush(); - final ClosureStats stats; switch (closureEnum) { @@ -1145,6 +1139,12 @@ * Incremental truth maintenance. */ + if (buffer == null) + throw new IllegalStateException(); + + // flush anything in the buffer. + buffer.flush(); + stats = new TruthMaintenance(inferenceEngine) .assertAll((TempTripleStore) buffer.getStatementStore()); @@ -1252,7 +1252,7 @@ final int remaining = args.length - i; - if (remaining < 2) { + if (remaining < 1/*allow run w/o any named files or directories*/) { System.err.println("Not enough arguments."); @@ -1360,7 +1360,8 @@ } final LoadStats totals = new LoadStats(); - final DataLoader dataLoader = kb.getDataLoader(); + final DataLoader dataLoader = //kb.getDataLoader(); + new DataLoader(properties,kb); // use the override properties. for (File fileOrDir : files) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |