From 6fb865fbdc569128e13564bd3739bd7e5578192a Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 10 Oct 2008 08:39:11 +0000 Subject: [PATCH] - fix of bug in iterator in kelondroBLOBHeap which caused bug in crawl profile listing - some refactoring of classes that use kelondroMap (Map instead of HashMap) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5262 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- maptest | Bin 0 -> 150 bytes source/de/anomic/crawler/CrawlProfile.java | 10 ++-- .../de/anomic/crawler/NoticeURLImporter.java | 4 +- source/de/anomic/crawler/RobotsTxt.java | 9 ++-- source/de/anomic/data/blogBoard.java | 7 +-- source/de/anomic/data/blogBoardComments.java | 7 +-- source/de/anomic/data/bookmarksDB.java | 24 ++++----- source/de/anomic/data/messageBoard.java | 7 +-- source/de/anomic/data/userDB.java | 6 +-- source/de/anomic/data/wikiBoard.java | 7 +-- .../de/anomic/kelondro/kelondroBLOBHeap.java | 23 ++++++--- source/de/anomic/kelondro/kelondroMap.java | 47 ++++++++++++++---- .../kelondro/kelondroMapDataMining.java | 12 ++--- source/de/anomic/yacy/yacySeed.java | 7 +-- source/de/anomic/yacy/yacySeedDB.java | 10 ++-- 15 files changed, 112 insertions(+), 68 deletions(-) create mode 100644 maptest diff --git a/maptest b/maptest new file mode 100644 index 0000000000000000000000000000000000000000..35885194cf2fc7819967bd63e43df5d53912e81b GIT binary patch literal 150 zcmZQzV9+x(GLDAcp4ii%| Zn1*=lIt&dBQFNGFSQ5}-WMl-_0RT8g9-ROH literal 0 HcmV?d00001 diff --git a/source/de/anomic/crawler/CrawlProfile.java b/source/de/anomic/crawler/CrawlProfile.java index efb1c4ca9..d2cfbe625 100644 --- a/source/de/anomic/crawler/CrawlProfile.java +++ b/source/de/anomic/crawler/CrawlProfile.java @@ -121,7 +121,7 @@ public class CrawlProfile { } catch (final IOException e) {} } - public entry newEntry(final HashMap mem) { + public entry newEntry(final Map mem) { final entry ne = new entry(mem); try { profileTable.put(ne.handle(), ne.map()); @@ -193,7 +193,7 @@ public class CrawlProfile { } public entry getEntry(final String handle) { - HashMap m; + Map m; try { m = profileTable.get(handle); } catch (final IOException e) { @@ -252,7 +252,7 @@ public class CrawlProfile { public static final String XDSTOPW = "xdstopw"; public static final String XPSTOPW = "xpstopw"; - HashMap mem; + Map mem; private Map doms; public entry(final String name, final yacyURL startURL, final String generalFilter, final String specificFilter, @@ -299,13 +299,13 @@ public class CrawlProfile { return str.toString(); } - public entry(final HashMap mem) { + public entry(final Map mem) { this.mem = mem; this.doms = domsCache.get(this.mem.get(HANDLE)); if (this.doms == null) this.doms = new HashMap(); } - public HashMap map() { + public Map map() { return mem; } public String handle() { diff --git a/source/de/anomic/crawler/NoticeURLImporter.java b/source/de/anomic/crawler/NoticeURLImporter.java index 8546c2421..f37ab009e 100644 --- a/source/de/anomic/crawler/NoticeURLImporter.java +++ b/source/de/anomic/crawler/NoticeURLImporter.java @@ -177,7 +177,9 @@ public class NoticeURLImporter extends AbstractImporter implements Importer { if (sourceEntry != null) { this.profileCount++; this.importProfileHandleCache.add(profileHandle); - this.activeCrawls.newEntry((HashMap) sourceEntry.map().clone()); + HashMap mapclone = new HashMap(); + mapclone.putAll(sourceEntry.map()); + this.activeCrawls.newEntry((HashMap) mapclone); } else { this.log.logWarning("Profile '" + profileHandle + "' of url entry '" + nextHash + "' unknown."); continue; diff --git a/source/de/anomic/crawler/RobotsTxt.java b/source/de/anomic/crawler/RobotsTxt.java index ba97ef0ec..cc3f08005 100644 --- a/source/de/anomic/crawler/RobotsTxt.java +++ b/source/de/anomic/crawler/RobotsTxt.java @@ -37,6 +37,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; +import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import de.anomic.http.HttpClient; @@ -105,7 +106,7 @@ public class RobotsTxt { // this method will always return a non-null value Entry robotsTxt4Host = null; try { - final HashMap record = this.robotsTable.get(urlHostPort); + final Map record = this.robotsTable.get(urlHostPort); if (record != null) robotsTxt4Host = new Entry(urlHostPort, record); } catch (final kelondroException e) { resetDatabase(); @@ -134,7 +135,7 @@ public class RobotsTxt { // check the robots table again for all threads that come here because they waited for another one // to complete a download try { - final HashMap record = this.robotsTable.get(urlHostPort); + final Map record = this.robotsTable.get(urlHostPort); if (record != null) robotsTxt4Host = new Entry(urlHostPort, record); } catch (final kelondroException e) { resetDatabase(); @@ -261,11 +262,11 @@ public class RobotsTxt { public static final String CRAWL_DELAY_MILLIS = "crawlDelayMillis"; // this is a simple record structure that holds all properties of a single crawl start - HashMap mem; + Map mem; private LinkedList allowPathList, denyPathList; String hostName; - public Entry(final String hostName, final HashMap mem) { + public Entry(final String hostName, final Map mem) { this.hostName = hostName.toLowerCase(); this.mem = mem; diff --git a/source/de/anomic/data/blogBoard.java b/source/de/anomic/data/blogBoard.java index 33f1e2200..63678d0d7 100644 --- a/source/de/anomic/data/blogBoard.java +++ b/source/de/anomic/data/blogBoard.java @@ -35,6 +35,7 @@ import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.Map; import java.util.TreeSet; import javax.xml.parsers.DocumentBuilder; @@ -121,7 +122,7 @@ public class blogBoard { private BlogEntry readBlogEntry(String key, final kelondroMap base) { key = normalize(key); if (key.length() > keyLength) key = key.substring(0, keyLength); - HashMap record; + Map record; try { record = base.get(key); } catch (final IOException e) { @@ -307,7 +308,7 @@ public class blogBoard { public class BlogEntry { String key; - HashMap record; + Map record; public BlogEntry(final String nkey, final byte[] subject, final byte[] author, final String ip, final Date date, final byte[] page, final ArrayList comments, final String commentMode) { record = new HashMap(); @@ -325,7 +326,7 @@ public class blogBoard { wikiBoard.setAuthor(ip, new String(author)); } - BlogEntry(final String key, final HashMap record) { + BlogEntry(final String key, final Map record) { this.key = key; this.record = record; if (this.record.get("comments")==null) this.record.put("comments", listManager.collection2string(new ArrayList())); diff --git a/source/de/anomic/data/blogBoardComments.java b/source/de/anomic/data/blogBoardComments.java index d336df307..3aec9d112 100644 --- a/source/de/anomic/data/blogBoardComments.java +++ b/source/de/anomic/data/blogBoardComments.java @@ -34,6 +34,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.TimeZone; import javax.xml.parsers.DocumentBuilder; @@ -114,7 +115,7 @@ public class blogBoardComments { private CommentEntry read(String key, final kelondroMap base) { key = normalize(key); if (key.length() > keyLength) key = key.substring(0, keyLength); - HashMap record; + Map record; try { record = base.get(key); } catch (final IOException e) { @@ -211,7 +212,7 @@ public class blogBoardComments { public static class CommentEntry { String key; - HashMap record; + Map record; public CommentEntry(final String nkey, final byte[] subject, final byte[] author, final String ip, final Date date, final byte[] page) { record = new HashMap(); @@ -226,7 +227,7 @@ public class blogBoardComments { wikiBoard.setAuthor(ip, new String(author)); } - CommentEntry(final String key, final HashMap record) { + CommentEntry(final String key, final Map record) { this.key = key; this.record = record; if (this.record.get("comments")==null) this.record.put("comments", listManager.collection2string(new ArrayList())); diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.java index 585da42e0..7f89cd545 100644 --- a/source/de/anomic/data/bookmarksDB.java +++ b/source/de/anomic/data/bookmarksDB.java @@ -410,7 +410,7 @@ public class bookmarksDB { public Bookmark getBookmark(final String urlHash){ try { - final HashMap map = bookmarksTable.get(urlHash); + final Map map = bookmarksTable.get(urlHash); if (map == null) return null; return new Bookmark(map); } catch (final IOException e) { @@ -505,7 +505,7 @@ public class bookmarksDB { * @param hash an object of type String, containing a tagHash */ private Tag loadTag(final String hash){ - HashMap map; + Map map; Tag ret=null; try { map = tagsTable.get(hash); @@ -693,9 +693,9 @@ public class bookmarksDB { // --------------------------------------- public bookmarksDate getDate(final String date){ - HashMap map; + Map map; try { - map=datesTable.get(date); + map = datesTable.get(date); } catch (final IOException e) { map = null; } @@ -913,10 +913,10 @@ public class bookmarksDB { public static final String URL_HASHES="urlHashes"; public static final String TAG_NAME="tagName"; private final String tagHash; - private final HashMap mem; + private final Map mem; private Set urlHashes; - public Tag(final String hash, final HashMap map){ + public Tag(final String hash, final Map map){ tagHash=hash; mem=map; if(mem.containsKey(URL_HASHES)) @@ -938,7 +938,7 @@ public class bookmarksDB { urlHashes=new HashSet(); mem.put(TAG_NAME, name); } - public HashMap getMap(){ + public Map getMap(){ mem.put(URL_HASHES, listManager.collection2string(this.urlHashes)); return mem; } @@ -993,7 +993,7 @@ public class bookmarksDB { */ public class bookmarksDate{ public static final String URL_HASHES="urlHashes"; - private final HashMap mem; + private final Map mem; String date; public bookmarksDate(final String mydate){ @@ -1003,7 +1003,7 @@ public class bookmarksDB { mem.put(URL_HASHES, ""); } - public bookmarksDate(final String mydate, final HashMap map){ + public bookmarksDate(final String mydate, final Map map){ //round to seconds, but store as milliseconds (java timestamp) date=String.valueOf((Long.parseLong(mydate)/1000)*1000); mem=map; @@ -1075,9 +1075,9 @@ public class bookmarksDB { private String urlHash; private Set tags; private long timestamp; - HashMap entry; + Map entry; - public Bookmark(final String urlHash, final HashMap map) { + public Bookmark(final String urlHash, final Map map) { this.entry = map; this.urlHash=urlHash; if(map.containsKey(BOOKMARK_TAGS)) @@ -1129,7 +1129,7 @@ public class bookmarksDB { timestamp=System.currentTimeMillis(); } - public Bookmark(final HashMap map) throws MalformedURLException { + public Bookmark(final Map map) throws MalformedURLException { this((new yacyURL(map.get(BOOKMARK_URL), null)).hash(), map); } diff --git a/source/de/anomic/data/messageBoard.java b/source/de/anomic/data/messageBoard.java index 0a5af7666..a19961f7a 100644 --- a/source/de/anomic/data/messageBoard.java +++ b/source/de/anomic/data/messageBoard.java @@ -28,6 +28,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.TimeZone; import de.anomic.kelondro.kelondroBLOBTree; @@ -90,7 +91,7 @@ public class messageBoard { public class entry { String key; // composed by category and date - HashMap record; // contains author, target hash, subject and message + Map record; // contains author, target hash, subject and message public entry(final String category, String authorName, String authorHash, @@ -118,7 +119,7 @@ public class messageBoard { record.put("read", "false"); } - entry(final String key, final HashMap record) { + entry(final String key, final Map record) { this.key = key; this.record = record; } @@ -197,7 +198,7 @@ public class messageBoard { } public entry read(final String key) { - HashMap record; + Map record; try { record = database.get(key); } catch (final IOException e) { diff --git a/source/de/anomic/data/userDB.java b/source/de/anomic/data/userDB.java index afb9f1b0e..a941cb4ab 100644 --- a/source/de/anomic/data/userDB.java +++ b/source/de/anomic/data/userDB.java @@ -86,7 +86,7 @@ public final class userDB { if(userName.length()>128){ userName=userName.substring(0, 127); } - HashMap record; + Map record; try { record = userTable.get(userName); } catch (final IOException e) { @@ -312,11 +312,11 @@ public final class userDB { public static final int PROXY_TIMELIMIT_REACHED = 3; // this is a simple record structure that hold all properties of a user - HashMap mem; + Map mem; String userName; private final Calendar oldDate, newDate; - public Entry(final String userName, final HashMap mem) throws IllegalArgumentException { + public Entry(final String userName, final Map mem) throws IllegalArgumentException { if ((userName == null) || (userName.length() == 0)) throw new IllegalArgumentException("Username needed."); if(userName.length()>128){ diff --git a/source/de/anomic/data/wikiBoard.java b/source/de/anomic/data/wikiBoard.java index 4ce477180..27716b2e0 100644 --- a/source/de/anomic/data/wikiBoard.java +++ b/source/de/anomic/data/wikiBoard.java @@ -28,6 +28,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.TimeZone; import de.anomic.kelondro.kelondroBLOBTree; @@ -116,7 +117,7 @@ public class wikiBoard { public class entry { String key; - HashMap record; + Map record; public entry(final String subject, String author, String ip, String reason, final byte[] page) throws IOException { record = new HashMap(); @@ -137,7 +138,7 @@ public class wikiBoard { //System.out.println("DEBUG: setting author " + author + " for ip = " + ip + ", authors = " + authors.toString()); } - entry(final String key, final HashMap record) { + entry(final String key, final Map record) { this.key = key; this.record = record; } @@ -275,7 +276,7 @@ public class wikiBoard { try { key = normalize(key); if (key.length() > keyLength) key = key.substring(0, keyLength); - final HashMap record = base.get(key); + final Map record = base.get(key); if (record == null) return newEntry(key, "anonymous", "127.0.0.1", "New Page", "".getBytes()); return new entry(key, record); } catch (final IOException e) { diff --git a/source/de/anomic/kelondro/kelondroBLOBHeap.java b/source/de/anomic/kelondro/kelondroBLOBHeap.java index edc9d0641..9afd01236 100755 --- a/source/de/anomic/kelondro/kelondroBLOBHeap.java +++ b/source/de/anomic/kelondro/kelondroBLOBHeap.java @@ -37,11 +37,11 @@ import de.anomic.server.logging.serverLog; public final class kelondroBLOBHeap implements kelondroBLOB { - private kelondroBytesLongMap index; // key/seek relation for used records - private ArrayList free; // list of {size, seek} pairs denoting space and position of free records - private final File heapFile; // the file of the heap - private final kelondroByteOrder ordering; // the ordering on keys - private RandomAccessFile file; // a random access to the file + private kelondroBytesLongMap index; // key/seek relation for used records + private ArrayList free; // list of {size, seek} pairs denoting space and position of free records + private final File heapFile; // the file of the heap + private final kelondroByteOrder ordering; // the ordering on keys + private RandomAccessFile file; // a random access to the file public static class gap { public long seek; @@ -436,7 +436,7 @@ public final class kelondroBLOBHeap implements kelondroBLOB { * @throws IOException */ public synchronized kelondroCloneableIterator keys(final boolean up, final boolean rotating) throws IOException { - return new kelondroRotateIterator(this.index.keys(up, null), null, 1); + return new kelondroRotateIterator(this.index.keys(up, null), null, this.index.size()); } /** @@ -459,6 +459,15 @@ public final class kelondroBLOBHeap implements kelondroBLOB { heap.put("aaaaaaaaaaab".getBytes(), "vier fuenf sechs".getBytes()); heap.put("aaaaaaaaaaac".getBytes(), "sieben acht neun".getBytes()); heap.put("aaaaaaaaaaad".getBytes(), "zehn elf zwoelf".getBytes()); + // iterate over keys + Iterator i = heap.index.keys(true, null); + while (i.hasNext()) { + System.out.println("key_a: " + new String(i.next())); + } + i = heap.keys(true, false); + while (i.hasNext()) { + System.out.println("key_b: " + new String(i.next())); + } heap.remove("aaaaaaaaaaab".getBytes()); heap.remove("aaaaaaaaaaac".getBytes()); heap.close(); @@ -466,5 +475,5 @@ public final class kelondroBLOBHeap implements kelondroBLOB { e.printStackTrace(); } } - + } diff --git a/source/de/anomic/kelondro/kelondroMap.java b/source/de/anomic/kelondro/kelondroMap.java index 7ea7805fe..6c1900b50 100644 --- a/source/de/anomic/kelondro/kelondroMap.java +++ b/source/de/anomic/kelondro/kelondroMap.java @@ -29,6 +29,7 @@ package de.anomic.kelondro; import java.io.BufferedReader; import java.io.ByteArrayInputStream; +import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; @@ -41,13 +42,13 @@ public class kelondroMap { private final kelondroBLOB blob; private kelondroMScoreCluster cacheScore; - private HashMap> cache; + private HashMap> cache; private final long startup; private final int cachesize; public kelondroMap(final kelondroBLOB blob, final int cachesize) { this.blob = blob; - this.cache = new HashMap>(); + this.cache = new HashMap>(); this.cacheScore = new kelondroMScoreCluster(); this.startup = System.currentTimeMillis(); this.cachesize = cachesize; @@ -67,7 +68,7 @@ public class kelondroMap { */ public void clear() throws IOException { this.blob.clear(); - this.cache = new HashMap>(); + this.cache = new HashMap>(); this.cacheScore = new kelondroMScoreCluster(); } @@ -108,7 +109,7 @@ public class kelondroMap { * @param newMap * @throws IOException */ - public synchronized void put(String key, final HashMap newMap) throws IOException { + public synchronized void put(String key, final Map newMap) throws IOException { assert (key != null); assert (key.length() > 0); assert (newMap != null); @@ -163,18 +164,18 @@ public class kelondroMap { * @return * @throws IOException */ - public synchronized HashMap get(final String key) throws IOException { + public synchronized Map get(final String key) throws IOException { if (key == null) return null; return get(key, true); } - protected synchronized HashMap get(String key, final boolean storeCache) throws IOException { + protected synchronized Map get(String key, final boolean storeCache) throws IOException { // load map from cache assert key != null; if (cache == null) return null; // case may appear during shutdown while (key.length() < blob.keylength()) key += "_"; - HashMap map = cache.get(key); + Map map = cache.get(key); if (map != null) return map; // load map from kra @@ -269,7 +270,7 @@ public class kelondroMap { blob.close(); } - public class objectIterator implements Iterator> { + public class objectIterator implements Iterator> { // enumerates Map-Type elements // the key is also included in every map that is returned; it's key is 'key' @@ -285,14 +286,14 @@ public class kelondroMap { return (!(finish)) && (keyIterator.hasNext()); } - public HashMap next() { + public Map next() { final byte[] nextKey = keyIterator.next(); if (nextKey == null) { finish = true; return null; } try { - final HashMap obj = get(new String(nextKey)); + final Map obj = get(new String(nextKey)); if (obj == null) throw new kelondroException("no more elements available"); return obj; } catch (final IOException e) { @@ -306,4 +307,30 @@ public class kelondroMap { } } // class mapIterator + public static void main(String[] args) { + // test the class + File f = new File("maptest"); + if (f.exists()) f.delete(); + try { + // make a blob + kelondroBLOB blob = new kelondroBLOBHeap(f, 12, kelondroNaturalOrder.naturalOrder); + // make map + kelondroMap map = new kelondroMap(blob, 1024); + // put some values into the map + HashMap m = new HashMap(); + m.put("k", "000"); map.put("123", m); + m.put("k", "111"); map.put("456", m); + m.put("k", "222"); map.put("789", m); + // iterate over keys + Iterator i = map.keys(true, false); + while (i.hasNext()) { + System.out.println("key: " + new String(i.next())); + } + // clean up + map.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } diff --git a/source/de/anomic/kelondro/kelondroMapDataMining.java b/source/de/anomic/kelondro/kelondroMapDataMining.java index c661a645e..32590b357 100644 --- a/source/de/anomic/kelondro/kelondroMapDataMining.java +++ b/source/de/anomic/kelondro/kelondroMapDataMining.java @@ -345,13 +345,13 @@ public class kelondroMapDataMining extends kelondroMap { super.close(); } - public class mapIterator implements Iterator> { + public class mapIterator implements Iterator> { // enumerates Map-Type elements // the key is also included in every map that is returned; it's key is 'key' Iterator keyIterator; boolean finish; - HashMap n; + Map n; public mapIterator(final Iterator keyIterator) { this.keyIterator = keyIterator; @@ -363,17 +363,17 @@ public class kelondroMapDataMining extends kelondroMap { return this.n != null; } - public HashMap next() { - final HashMap n1 = n; + public Map next() { + final Map n1 = n; n = next0(); return n1; } - private HashMap next0() { + private Map next0() { if (finish) return null; if (keyIterator == null) return null; String nextKey; - HashMap map; + Map map; while (keyIterator.hasNext()) { nextKey = new String(keyIterator.next()); if (nextKey == null) { diff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.java index 1037bd558..d68e7b1a9 100644 --- a/source/de/anomic/yacy/yacySeed.java +++ b/source/de/anomic/yacy/yacySeed.java @@ -50,6 +50,7 @@ import java.net.URL; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.Random; import java.util.Set; import java.util.TreeMap; @@ -161,12 +162,12 @@ public class yacySeed implements Cloneable { /** the peer-hash */ public String hash; /** a set of identity founding values, eg. IP, name of the peer, YaCy-version, ...*/ - private final HashMap dna; + private final Map dna; public int available; public int selectscore = -1; // only for debugging public String alternativeIP = null; - public yacySeed(final String theHash, final HashMap theDna) { + public yacySeed(final String theHash, final Map theDna) { // create a seed with a pre-defined hash map this.hash = theHash; this.dna = theDna; @@ -351,7 +352,7 @@ public class yacySeed implements Cloneable { } /** @return the DNA-map of this peer */ - public final HashMap getMap() { + public final Map getMap() { return this.dna; } diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java index f3dec6447..d5947fd8b 100644 --- a/source/de/anomic/yacy/yacySeedDB.java +++ b/source/de/anomic/yacy/yacySeedDB.java @@ -443,7 +443,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames { //seed.put(yacySeed.LASTSEEN, yacyCore.shortFormatter.format(new Date(yacyCore.universalTime()))); try { nameLookupCache.put(seed.getName(), seed); - final HashMap seedPropMap = seed.getMap(); + final Map seedPropMap = seed.getMap(); synchronized (seedPropMap) { seedActiveDB.put(seed.hash, seedPropMap); } @@ -470,7 +470,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames { } catch (final Exception e) { serverLog.logWarning("yacySeedDB", "could not remove hash ("+ e.getClass() +"): "+ e.getMessage()); } //seed.put(yacySeed.LASTSEEN, yacyCore.shortFormatter.format(new Date(yacyCore.universalTime()))); try { - final HashMap seedPropMap = seed.getMap(); + final Map seedPropMap = seed.getMap(); synchronized (seedPropMap) { seedPassiveDB.put(seed.hash, seedPropMap); } @@ -495,7 +495,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames { } catch (final Exception e) { serverLog.logWarning("yacySeedDB", "could not remove hash ("+ e.getClass() +"): "+ e.getMessage()); } //seed.put(yacySeed.LASTSEEN, yacyCore.shortFormatter.format(new Date(yacyCore.universalTime()))); try { - final HashMap seedPropMap = seed.getMap(); + final Map seedPropMap = seed.getMap(); synchronized (seedPropMap) { seedPotentialDB.put(seed.hash, seedPropMap); } @@ -552,7 +552,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames { private yacySeed get(final String hash, final kelondroMapDataMining database) { if (hash == null) return null; if ((this.mySeed != null) && (hash.equals(mySeed.hash))) return mySeed; - HashMap entry; + Map entry; try { entry = database.get(hash); } catch (final IOException e) { @@ -1006,7 +1006,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames { public yacySeed internalNext() { if ((it == null) || (!(it.hasNext()))) return null; try { - final HashMap dna = it.next(); + final Map dna = it.next(); if (dna == null) return null; final String hash = dna.remove("key"); //while (hash.length() < commonHashLength) { hash = hash + "_"; }