Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/processor/TitleSetFilter.java |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | public class TitleSetFilter extends PageTitleFilter { |
18 | 18 | |
19 | 19 | protected static Set<String> slurpCursor(DataCursor<String> titleCursor) throws PersistenceException { |
20 | | - Map<String, Integer> map = NameMaps.newMap(); |
| 20 | + Map<String, Integer> map = NameMaps.newMap("hash"); |
21 | 21 | |
22 | 22 | final Integer ONE = new Integer(1); |
23 | 23 | |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/NameMaps.java |
— | — | @@ -7,12 +7,14 @@ |
8 | 8 | import org.ardverk.collection.StringKeyAnalyzer; |
9 | 9 | |
10 | 10 | public class NameMaps { |
11 | | - public static <V> Map<String, V> newMap() { |
12 | | - try { |
13 | | - PatriciaTrie<String, V> trie = new PatriciaTrie<String, V>(new StringKeyAnalyzer()); |
14 | | - return trie; |
15 | | - } catch (LinkageError ex) { |
16 | | - //noop |
| 11 | + public static <V> Map<String, V> newMap(String mapType) { |
| 12 | + if (mapType.equals("patricia")) { |
| 13 | + try { |
| 14 | + PatriciaTrie<String, V> trie = new PatriciaTrie<String, V>(new StringKeyAnalyzer()); |
| 15 | + return trie; |
| 16 | + } catch (LinkageError ex) { |
| 17 | + //noop |
| 18 | + } |
17 | 19 | } |
18 | 20 | |
19 | 21 | return new HashMap<String, V>(); |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseLocalConceptStoreBuilder.java |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | log("storing ID mappings in "+f); |
175 | 175 | int bsz = tweaks.getTweak("dbstore.idManager.bufferSize", 16*1024); |
176 | 176 | |
177 | | - Map<String, Integer> map = NameMaps.newMap(); |
| 177 | + Map<String, Integer> map = NameMaps.newMap(tweaks.getTweak("dbstore.idManager.mapType", "hash")); |
178 | 178 | idManager = new PersistentIdManager(map, f, "UTF-8", bsz); |
179 | 179 | } catch (SQLException e) { |
180 | 180 | throw new PersistenceException(e); |
Index: trunk/WikiWord/WikiWordBuilder/.classpath |
— | — | @@ -15,5 +15,6 @@ |
16 | 16 | </attributes> |
17 | 17 | </classpathentry> |
18 | 18 | <classpathentry kind="var" path="M2_REPO/org/javolution/javolution/5.2.6/javolution-5.2.6.jar"/> |
| 19 | + <classpathentry kind="lib" path="lib/jzlib-1.0.7.jar" sourcepath="/home/daniel/src/jzlib-1.0.7"/> |
19 | 20 | <classpathentry kind="output" path="bin"/> |
20 | 21 | </classpath> |