r65880 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65879‎ | r65880 | r65881 >
Date:21:52, 3 May 2010
Author:daniel
Status:deferred
Tags:
Comment:
don't require term stats
Modified paths:
  • /trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/schema/LocalStatisticsStoreSchema.java (modified) (history)
  • /trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/schema/StatisticsStoreSchema.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/schema/LocalStatisticsStoreSchema.java
@@ -39,11 +39,15 @@
4040 public boolean isComplete() throws SQLException {
4141 if (!super.isComplete()) return false;
4242
 43+ //NOTE: term stats may have been skipped.
 44+ // they are not needed for most kinds of processing.
 45+ /*
4346 if (!this.tableExists("term")) return false;
4447
4548 String sql = "select count(*) from "+this.getSQLTableName("term");
4649 int c = ((Number)this.executeSingleValueQuery("isComplete", sql)).intValue();
4750 if (c==0) return false;
 51+ */
4852
4953 return true;
5054 }
Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/schema/StatisticsStoreSchema.java
@@ -111,25 +111,22 @@
112112 @Override
113113 public boolean isComplete() throws SQLException {
114114 if (!super.isComplete()) return false;
 115+
 116+ String sql;
 117+ int c;
 118+
115119 if (!this.tableExists("stats")) return false;
116120
117 - /*
118 - if (!this.tableExists("term")) return false;
119 - if (!this.tableExists("degree")) return false;
120 -
121 - String sql = "select count(*) from "+this.getSQLTableName("term");
122 - int c = ((Number)this.executeSingleValueQuery("isComplete", sql)).intValue();
 121+ sql = "select count(*) from "+this.getSQLTableName("stats");
 122+ c = ((Number)this.executeSingleValueQuery("isComplete", sql)).intValue();
123123 if (c==0) return false;
 124+
 125+ if (!this.tableExists("degree")) return false;
124126
125127 sql = "select count(*) from "+this.getSQLTableName("degree");
126128 c = ((Number)this.executeSingleValueQuery("isComplete", sql)).intValue();
127129 if (c==0) return false;
128 - */
129130
130 - String sql = "select count(*) from "+this.getSQLTableName("stats");
131 - int c = ((Number)this.executeSingleValueQuery("isComplete", sql)).intValue();
132 - if (c==0) return false;
133 -
134131 return true;
135132 }
136133

Status & tagging log