r48230 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48229‎ | r48230 | r48231 >
Date:15:50, 9 March 2009
Author:daniel
Status:deferred
Tags:
Comment:
create and pass agenda explicitly, to avoid duplicater agenda fuckup
Modified paths:
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/AbstractImporter.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/ImportApp.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/ImportDump.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseConceptStoreBuilders.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseGlobalConceptStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseIncrementalStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseLocalConceptStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabasePropertyStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseTextStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseWikiWordConceptStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseWikiWordStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DebugLocalConceptStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/FauxStoreBuilder.java (modified) (history)
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/WikiWordStoreBuilder.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/ImportDump.java
@@ -18,8 +18,9 @@
1919 protected URL dumpFile;
2020
2121 @Override
22 - protected void applyArguments() {
 22+ protected boolean applyArguments() {
2323 String d = getTargetFileName();
 24+ if (d==null) return false;
2425
2526 if (args.isSet("url")) {
2627 try {
@@ -35,6 +36,8 @@
3637 throw new RuntimeException("failed to generate local file url for `"+d+"`");
3738 }
3839 }
 40+
 41+ return true;
3942 }
4043
4144 @Override
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/ImportApp.java
@@ -44,7 +44,7 @@
4545 @SuppressWarnings("unchecked")
4646 @Override
4747 protected WikiWordStoreFactory<S> createConceptStoreFactory() throws IOException, PersistenceException {
48 - return new DatabaseConceptStoreBuilders.Factory(getConfiguredDataSource(), getConfiguredDataset(), tweaks, true, true);
 48+ return new DatabaseConceptStoreBuilders.Factory(getConfiguredDataSource(), getConfiguredDataset(), tweaks, null, true, true);
4949 }
5050
5151 @Override
@@ -248,6 +248,16 @@
249249 }
250250 }
251251
 252+ protected void createStores(WikiWordStoreFactory<? extends S> factory) throws IOException, PersistenceException {
 253+ super.createStores(factory);
 254+
 255+ boolean noimport = args.isSet("noimport");
 256+
 257+ if (!noimport && useAgenda) {
 258+ agenda = conceptStore.createAgenda();
 259+ }
 260+ }
 261+
252262 @Override
253263 protected void execute() throws Exception {
254264 boolean noimport = args.isSet("noimport");
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/AbstractImporter.java
@@ -51,6 +51,34 @@
5252 }
5353 }
5454
 55+ protected static class MemoryTracker extends ProgressRateTracker {
 56+ protected long baseline = 0;
 57+ protected long used = 0;
 58+
 59+ public MemoryTracker() {
 60+ }
 61+
 62+ protected long getUsedMemory() {
 63+ return Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
 64+ }
 65+
 66+ protected void step() {
 67+ if (baseline<=0) baseline = getUsedMemory();
 68+ }
 69+
 70+ protected void chunk() {
 71+ if (baseline<=0) baseline = getUsedMemory();
 72+ used = getUsedMemory();
 73+ super.progress(new Progress.Event(Progress.PROGRESS, null, "memory", Runtime.getRuntime().totalMemory() - baseline, used - baseline, null));
 74+ }
 75+
 76+ @Override
 77+ public String toString() {
 78+ //return MessageFormat.format("{0}: {1,number,0}KB ({2,number,0.0}KB/sec, currently {3,number,0.0}KB/sec)", "memory", position/1024, getAverageRate()/1024, getCurrentRate()/1024);
 79+ return MessageFormat.format("{0}: {1,number,0}KB", "memory", position/1024);
 80+ }
 81+ }
 82+
5583 private int progressInterval = 1000;
5684 private int safepointInterval = 30 * 1000;
5785
@@ -59,6 +87,8 @@
6088
6189 private Tracker pageTracker;
6290 private Tracker bulkTracker;
 91+ private MemoryTracker memoryTracker;
 92+
6393 private int progressTicks = 0;
6494 private int safepointTicks = 0;
6595 private int safepointNumber = 0;
@@ -112,6 +142,7 @@
113143 public void reset() {
114144 pageTracker = new Tracker("pages");
115145 bulkTracker = new Tracker("chars");
 146+ memoryTracker = new MemoryTracker();
116147 progressTicks = 0;
117148 safepointTicks = 0;
118149 }
@@ -119,11 +150,20 @@
120151 public void trackerChunk() {
121152 pageTracker.chunk();
122153 bulkTracker.chunk();
 154+ memoryTracker.chunk();
123155
124156 out.info("--- "+new Date()+" ---");
125157 out.info("- "+pageTracker);
126158 out.info("- "+bulkTracker);
 159+ out.info("- "+memoryTracker);
127160 }
 161+
 162+ public void memoryTrackerChunk() {
 163+ memoryTracker.chunk();
 164+
 165+ out.info("--- "+new Date()+" ---");
 166+ out.info("- "+memoryTracker);
 167+ }
128168
129169 /*
130170 public boolean isSafepoint(Agenda.Record rec) {
@@ -184,6 +224,7 @@
185225 if (doit) {
186226 pageTracker.step();
187227 bulkTracker.step(text.length());
 228+ memoryTracker.step();
188229
189230 int rcId = importPage(namespace, title, text, timestamp);
190231 if (rcId>0) lastRcId = rcId;
@@ -342,6 +383,7 @@
343384
344385 public void endTask(String context, String task) throws PersistenceException {
345386 store.getAgenda().endTask(context, task);
 387+ memoryTrackerChunk();
346388 }
347389
348390 public int getSkip() {
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DebugLocalConceptStoreBuilder.java
@@ -68,6 +68,10 @@
6969 return null;
7070 }
7171
 72+ public Agenda createAgenda() throws PersistenceException {
 73+ return null;
 74+ }
 75+
7276 public int getNumberOfWarnings() throws PersistenceException {
7377 return 0;
7478 }
@@ -162,6 +166,10 @@
163167 return null;
164168 }
165169
 170+ public Agenda createAgenda() throws PersistenceException {
 171+ return null;
 172+ }
 173+
166174 public int getNumberOfWarnings() throws PersistenceException {
167175 return 0;
168176 }
@@ -252,6 +260,10 @@
253261 return agenda;
254262 }
255263
 264+ public Agenda createAgenda() throws PersistenceException {
 265+ return null;
 266+ }
 267+
256268 public int getNumberOfWarnings() throws PersistenceException {
257269 return 0;
258270 }
@@ -335,6 +347,10 @@
336348 return agenda;
337349 }
338350
 351+ public Agenda createAgenda() throws PersistenceException {
 352+ return null;
 353+ }
 354+
339355 public int getNumberOfWarnings() throws PersistenceException {
340356 return 0;
341357 }
@@ -573,6 +589,10 @@
574590 return agenda;
575591 }
576592
 593+ public Agenda createAgenda() throws PersistenceException {
 594+ return null;
 595+ }
 596+
577597 public void optimize() {
578598 trace("- optimize");
579599 }
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseWikiWordStoreBuilder.java
@@ -28,7 +28,8 @@
2929 extends DatabaseWikiWordStore
3030 implements WikiWordStoreBuilder {
3131
32 - protected Agenda agenda;
 32+ private Agenda agenda;
 33+
3334 protected Map<String, Inserter> inserters = new HashMap<String, Inserter>();
3435
3536 protected Inserter warningInserter;
@@ -42,9 +43,11 @@
4344 protected boolean useEntityBuffer;
4445 protected boolean useRelationBuffer;
4546
46 - protected DatabaseWikiWordStoreBuilder(WikiWordStoreSchema database, TweakSet tweaks) throws SQLException {
 47+ protected DatabaseWikiWordStoreBuilder(WikiWordStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
4748 super(database, tweaks);
4849
 50+ this.agenda = agenda;
 51+
4952 int bufferScale = database.getBufferScale();
5053
5154 useEntityBuffer = bufferScale > 0 && tweaks.getTweak("dbstore.useEntityBuffer", Boolean.TRUE);
@@ -400,15 +403,21 @@
401404 * @see de.brightbyte.wikiword.store.builder.LocalConceptStoreBuilder#getAgenda()
402405 */
403406 @Override
404 - public Agenda getAgenda() throws PersistenceException {
405 - if (agenda==null) {
406 - try {
407 - DatabaseAgendaPersistor log = new DatabaseAgendaPersistor(database.getTable("log"));
408 - agenda = new Agenda(log);
409 - } catch (SQLException e) {
410 - throw new PersistenceException(e);
411 - }
 407+ public Agenda getAgenda() {
 408+ return agenda;
 409+ }
 410+
 411+ @Override
 412+ public Agenda createAgenda() throws PersistenceException {
 413+ if (agenda!=null) return agenda;
 414+
 415+ try {
 416+ DatabaseAgendaPersistor log = new DatabaseAgendaPersistor(database.getTable("log"));
 417+ agenda = new Agenda(log);
 418+ } catch (SQLException e) {
 419+ throw new PersistenceException(e);
412420 }
 421+
413422 return agenda;
414423 }
415424
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseIncrementalStoreBuilder.java
@@ -2,14 +2,15 @@
33
44 import java.sql.SQLException;
55
 6+import de.brightbyte.application.Agenda;
67 import de.brightbyte.util.PersistenceException;
78 import de.brightbyte.wikiword.TweakSet;
89 import de.brightbyte.wikiword.schema.WikiWordStoreSchema;
910
1011 public abstract class DatabaseIncrementalStoreBuilder extends DatabaseWikiWordStoreBuilder implements IncrementalStoreBuilder {
1112
12 - public DatabaseIncrementalStoreBuilder(WikiWordStoreSchema database, TweakSet tweaks) throws SQLException {
13 - super(database, tweaks);
 13+ protected DatabaseIncrementalStoreBuilder(WikiWordStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 14+ super(database, tweaks, agenda);
1415 }
1516
1617 protected abstract void deleteDataFrom(int rcId, String op) throws PersistenceException;
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseLocalConceptStoreBuilder.java
@@ -11,6 +11,7 @@
1212
1313 import javax.sql.DataSource;
1414
 15+import de.brightbyte.application.Agenda;
1516 import de.brightbyte.data.PersistentIdManager;
1617 import de.brightbyte.data.cursor.CursorProcessor;
1718 import de.brightbyte.data.cursor.DataSet;
@@ -86,8 +87,8 @@
8788 * @param dbInfo database connection info, used to connect to the database
8889 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
8990 */
90 - public DatabaseLocalConceptStoreBuilder(Corpus corpus, DataSource dbInfo, TweakSet tweaks) throws SQLException {
91 - this(new LocalConceptStoreSchema(corpus, dbInfo, tweaks, true), tweaks);
 91+ public DatabaseLocalConceptStoreBuilder(Corpus corpus, DataSource dbInfo, TweakSet tweaks, Agenda agenda) throws SQLException {
 92+ this(new LocalConceptStoreSchema(corpus, dbInfo, tweaks, true), tweaks, agenda);
9293 }
9394
9495 /**
@@ -99,8 +100,8 @@
100101 * @param db a database connection
101102 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
102103 */
103 - public DatabaseLocalConceptStoreBuilder(Corpus corpus, Connection db, TweakSet tweaks) throws SQLException {
104 - this(new LocalConceptStoreSchema(corpus, db, tweaks, true), tweaks);
 104+ public DatabaseLocalConceptStoreBuilder(Corpus corpus, Connection db, TweakSet tweaks, Agenda agenda) throws SQLException {
 105+ this(new LocalConceptStoreSchema(corpus, db, tweaks, true), tweaks, agenda);
105106 }
106107
107108 /**
@@ -113,8 +114,8 @@
114115 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
115116 * @throws SQLException
116117 */
117 - public DatabaseLocalConceptStoreBuilder(LocalConceptStoreSchema database, TweakSet tweaks) throws SQLException {
118 - super(database, tweaks);
 118+ public DatabaseLocalConceptStoreBuilder(LocalConceptStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 119+ super(database, tweaks, agenda);
119120
120121 this.corpus = database.getCorpus();
121122 this.tweaks = tweaks;
@@ -1150,8 +1151,8 @@
11511152 protected class DatabaseLocalStatisticsStoreBuilder extends DatabaseStatisticsStoreBuilder {
11521153 protected EntityTable termTable;
11531154
1154 - protected DatabaseLocalStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks) throws SQLException {
1155 - super(database, tweaks);
 1155+ protected DatabaseLocalStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 1156+ super(database, tweaks, agenda);
11561157
11571158 Inserter termInserter = configureTable("term", 64, 1024);
11581159 termTable = (EntityTable)termInserter.getTable();
@@ -1207,8 +1208,8 @@
12081209
12091210 protected EntityTable conceptDescriptionTable;
12101211
1211 - protected DatabaseLocalConceptInfoStoreBuilder(ConceptInfoStoreSchema database, TweakSet tweaks) throws SQLException {
1212 - super(database, tweaks);
 1212+ protected DatabaseLocalConceptInfoStoreBuilder(ConceptInfoStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 1213+ super(database, tweaks, agenda);
12131214
12141215 Inserter conceptDescriptionInserter = configureTable("concept_description", 64, 1024);
12151216 conceptDescriptionTable = (EntityTable)conceptDescriptionInserter.getTable();
@@ -1267,13 +1268,13 @@
12681269 @Override
12691270 protected DatabaseConceptInfoStoreBuilder<LocalConcept> newConceptInfoStoreBuilder() throws SQLException {
12701271 ConceptInfoStoreSchema schema = new ConceptInfoStoreSchema(getDatasetIdentifier(), getDatabaseAccess().getConnection(), true, tweaks, false, true);
1271 - return new DatabaseLocalConceptInfoStoreBuilder(schema, tweaks);
 1272+ return new DatabaseLocalConceptInfoStoreBuilder(schema, tweaks, getAgenda());
12721273 }
12731274
12741275 @Override
12751276 protected DatabaseStatisticsStoreBuilder newStatisticsStoreBuilder() throws SQLException {
12761277 StatisticsStoreSchema schema = new LocalStatisticsStoreSchema(getDatasetIdentifier(), getDatabaseAccess().getConnection(), tweaks, false);
1277 - return new DatabaseLocalStatisticsStoreBuilder(schema, tweaks);
 1278+ return new DatabaseLocalStatisticsStoreBuilder(schema, tweaks, getAgenda());
12781279 }
12791280
12801281 @Override
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/WikiWordStoreBuilder.java
@@ -27,6 +27,8 @@
2828
2929 //public abstract void deleteDataAfter(int rcId) throws PersistenceException;
3030
 31+ public abstract Agenda createAgenda() throws PersistenceException;
 32+
3133 public abstract Agenda getAgenda() throws PersistenceException;
3234
3335 public abstract void optimize() throws PersistenceException;
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseWikiWordConceptStoreBuilder.java
@@ -9,6 +9,7 @@
1010 import java.util.List;
1111 import java.util.Map;
1212
 13+import de.brightbyte.application.Agenda;
1314 import de.brightbyte.data.IntList;
1415 import de.brightbyte.data.IntRelation;
1516 import de.brightbyte.data.cursor.DataSet;
@@ -57,8 +58,8 @@
5859 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
5960 * @throws SQLException
6061 */
61 - public DatabaseWikiWordConceptStoreBuilder(WikiWordConceptStoreSchema database, TweakSet tweaks) throws SQLException {
62 - super(database, tweaks);
 62+ public DatabaseWikiWordConceptStoreBuilder(WikiWordConceptStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 63+ super(database, tweaks, agenda);
6364
6465 conceptInserter = configureTable("concept", 256, 32);
6566 broaderInserter = configureTable("broader", 1024, 64);
@@ -463,8 +464,8 @@
464465 protected EntityTable statsTable;
465466 protected EntityTable degreeTable;
466467
467 - protected DatabaseStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks) throws SQLException {
468 - super(database, tweaks);
 468+ protected DatabaseStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 469+ super(database, tweaks, agenda);
469470
470471 //XXX: wen don't need inserters, really...
471472 Inserter statsInserter = configureTable("stats", 64, 1024);
@@ -764,8 +765,8 @@
765766
766767 protected EntityTable conceptInfoTable;
767768
768 - protected DatabaseConceptInfoStoreBuilder(ConceptInfoStoreSchema database, TweakSet tweaks) throws SQLException {
769 - super(database, tweaks);
 769+ protected DatabaseConceptInfoStoreBuilder(ConceptInfoStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 770+ super(database, tweaks, agenda);
770771
771772 Inserter conceptInfoInserter = configureTable("concept_info", 64, 1024);
772773 conceptInfoTable = (EntityTable)conceptInfoInserter.getTable();
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseGlobalConceptStoreBuilder.java
@@ -69,8 +69,8 @@
7070 * @param dbInfo database connection info, used to connect to the database
7171 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
7272 */
73 - public DatabaseGlobalConceptStoreBuilder(DatasetIdentifier set, DataSource dbInfo, TweakSet tweaks) throws SQLException {
74 - this(new GlobalConceptStoreSchema(set, dbInfo, tweaks, true), tweaks);
 73+ public DatabaseGlobalConceptStoreBuilder(DatasetIdentifier set, DataSource dbInfo, TweakSet tweaks, Agenda agenda) throws SQLException {
 74+ this(new GlobalConceptStoreSchema(set, dbInfo, tweaks, true), tweaks, agenda);
7575 }
7676
7777 /**
@@ -82,8 +82,8 @@
8383 * @param db a database connection
8484 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
8585 */
86 - public DatabaseGlobalConceptStoreBuilder(DatasetIdentifier set, Connection db, TweakSet tweaks) throws SQLException {
87 - this(new GlobalConceptStoreSchema(set, db, tweaks, true), tweaks);
 86+ public DatabaseGlobalConceptStoreBuilder(DatasetIdentifier set, Connection db, TweakSet tweaks, Agenda agenda) throws SQLException {
 87+ this(new GlobalConceptStoreSchema(set, db, tweaks, true), tweaks, agenda);
8888 }
8989
9090 /**
@@ -96,8 +96,8 @@
9797 * @param tweaks a tweak set from which additional options can be taken (see description at the top).
9898 * @throws SQLException
9999 */
100 - public DatabaseGlobalConceptStoreBuilder(GlobalConceptStoreSchema database, TweakSet tweaks) throws SQLException {
101 - super(database, tweaks);
 100+ public DatabaseGlobalConceptStoreBuilder(GlobalConceptStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 101+ super(database, tweaks, agenda);
102102
103103 this.tweaks = tweaks;
104104
@@ -853,8 +853,8 @@
854854 /////////////////////////////////////////////////////////////////////////////////////////////
855855 protected class DatabaseGlobalStatisticsStoreBuilder extends DatabaseStatisticsStoreBuilder {
856856
857 - protected DatabaseGlobalStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks) throws SQLException {
858 - super(database, tweaks);
 857+ protected DatabaseGlobalStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 858+ super(database, tweaks, agenda);
859859 // TODO Auto-generated constructor stub
860860 }
861861
@@ -870,8 +870,8 @@
871871
872872 protected class DatabaseGlobalConceptInfoStoreBuilder extends DatabaseConceptInfoStoreBuilder<GlobalConcept> {
873873
874 - protected DatabaseGlobalConceptInfoStoreBuilder(ConceptInfoStoreSchema database, TweakSet tweaks) throws SQLException {
875 - super(database, tweaks);
 874+ protected DatabaseGlobalConceptInfoStoreBuilder(ConceptInfoStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException {
 875+ super(database, tweaks, agenda);
876876 }
877877
878878 @Override
@@ -891,13 +891,13 @@
892892 @Override
893893 protected DatabaseConceptInfoStoreBuilder<GlobalConcept> newConceptInfoStoreBuilder() throws SQLException {
894894 ConceptInfoStoreSchema schema = new ConceptInfoStoreSchema(getDatasetIdentifier(), getDatabaseAccess().getConnection(), false, tweaks, false, false);
895 - return new DatabaseGlobalConceptInfoStoreBuilder(schema, tweaks);
 895+ return new DatabaseGlobalConceptInfoStoreBuilder(schema, tweaks, getAgenda());
896896 }
897897
898898 @Override
899899 protected DatabaseStatisticsStoreBuilder newStatisticsStoreBuilder() throws SQLException {
900900 StatisticsStoreSchema schema = new StatisticsStoreSchema(getDatasetIdentifier(), getDatabaseAccess().getConnection(), true, tweaks, false);
901 - return new DatabaseGlobalStatisticsStoreBuilder(schema, tweaks);
 901+ return new DatabaseGlobalStatisticsStoreBuilder(schema, tweaks, getAgenda());
902902 }
903903
904904 @Override
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseConceptStoreBuilders.java
@@ -4,6 +4,7 @@
55
66 import javax.sql.DataSource;
77
 8+import de.brightbyte.application.Agenda;
89 import de.brightbyte.db.DatabaseSchema;
910 import de.brightbyte.util.PersistenceException;
1011 import de.brightbyte.wikiword.Corpus;
@@ -19,25 +20,27 @@
2021 private DataSource db;
2122 private DatasetIdentifier dataset;
2223 private TweakSet tweaks;
 24+ private Agenda agenda;
2325 private boolean allowCorpus;
2426 private boolean allowThesaurus;
2527
26 - public Factory(DataSource db, DatasetIdentifier dataset, TweakSet tweaks, boolean allowCorpus, boolean allowThesaurus) {
 28+ public Factory(DataSource db, DatasetIdentifier dataset, TweakSet tweaks, Agenda agenda, boolean allowCorpus, boolean allowThesaurus) {
2729 super();
2830 this.db = db;
2931 this.dataset = dataset;
3032 this.tweaks = tweaks;
 33+ this.agenda = agenda;
3134 this.allowCorpus = allowCorpus;
3235 this.allowThesaurus = allowThesaurus;
3336 }
3437
3538 @SuppressWarnings("unchecked")
3639 public DatabaseWikiWordConceptStoreBuilder<C> newStore() throws PersistenceException {
37 - return (DatabaseWikiWordConceptStoreBuilder<C>)createConceptStoreBuilder(db, dataset, tweaks, allowCorpus, allowThesaurus);
 40+ return (DatabaseWikiWordConceptStoreBuilder<C>)createConceptStoreBuilder(db, dataset, tweaks, agenda, allowCorpus, allowThesaurus);
3841 }
3942 }
4043
41 - public static DatabaseWikiWordConceptStoreBuilder<? extends WikiWordConcept> createConceptStoreBuilder(DataSource db, DatasetIdentifier dataset, TweakSet tweaks, boolean allowCorpus, boolean allowThesaurus) throws PersistenceException {
 44+ public static DatabaseWikiWordConceptStoreBuilder<? extends WikiWordConcept> createConceptStoreBuilder(DataSource db, DatasetIdentifier dataset, TweakSet tweaks, Agenda agenda, boolean allowCorpus, boolean allowThesaurus) throws PersistenceException {
4245 //XXX: UGLY HACK!
4346 try {
4447 DatabaseSchema dummy = new WikiWordStoreSchema(dataset, db, tweaks, false);
@@ -57,12 +60,12 @@
5861 if (dataset instanceof Corpus) {
5962 if (!allowCorpus) throw new RuntimeException("application is not corpus-based, but a corpus dataset was provided");
6063
61 - store = new DatabaseLocalConceptStoreBuilder((Corpus)dataset, dummy.getConnection(), tweaks);
 64+ store = new DatabaseLocalConceptStoreBuilder((Corpus)dataset, dummy.getConnection(), tweaks, agenda);
6265 }
6366 else {
6467 if (!allowThesaurus) throw new RuntimeException("application is not corpus, but no corpus dataset was provided");
6568
66 - store = new DatabaseGlobalConceptStoreBuilder(dataset, dummy.getConnection(), tweaks);
 69+ store = new DatabaseGlobalConceptStoreBuilder(dataset, dummy.getConnection(), tweaks, agenda);
6770 }
6871
6972 return store;
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/FauxStoreBuilder.java
@@ -55,11 +55,15 @@
5656 //noop
5757 }
5858
59 - public Agenda getAgenda() throws PersistenceException {
 59+ public Agenda createAgenda() throws PersistenceException {
6060 if (agenda==null) agenda = new Agenda(new Agenda.TransientPersistor());
6161 return agenda;
6262 }
6363
 64+ public Agenda getAgenda() {
 65+ return agenda;
 66+ }
 67+
6468 public int getNumberOfWarnings() throws PersistenceException {
6569 return 0;
6670 }
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseTextStoreBuilder.java
@@ -49,10 +49,9 @@
5050 }
5151
5252 protected DatabaseTextStoreBuilder(LocalConceptStoreSchema conceptStoreSchema, TextStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException, PersistenceException {
53 - super(database, tweaks);
 53+ super(database, tweaks, agenda);
5454
5555 localConceptDatabase = new LocalConceptStoreSchema(database.getCorpus(), database.getConnection(), tweaks, false);
56 - this.agenda = agenda;
5756
5857 //XXX: wen don't need inserters, really...
5958 plainTextInserter = configureTable("plaintext", 32, 8*1024);
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabasePropertyStoreBuilder.java
@@ -37,7 +37,7 @@
3838 }
3939
4040 protected DatabasePropertyStoreBuilder(LocalConceptStoreSchema conceptStoreSchema, PropertyStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException, PersistenceException {
41 - super(database, tweaks);
 41+ super(database, tweaks, agenda);
4242
4343 //this.conceptStore = conceptStore;
4444
@@ -45,7 +45,6 @@
4646 this.propertyTable = (RelationTable)propertyInserter.getTable();
4747
4848 this.conceptStoreSchema = conceptStoreSchema;
49 - this.agenda = agenda;
5049 }
5150
5251 @Override

Status & tagging log