final File yacyDBPath = new File(homePath, "DATA/INDEX/freeworld/NETWORK");
final String[] dbFileNames = {"seed.new.db","seed.old.db","seed.pot.db"};
for (final String dbFileName : dbFileNames) {
final File dbFile = new File(yacyDBPath,dbFileName);
final MapDataMining db = new MapDataMining(dbFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, yacySeedDB.sortFields, yacySeedDB.longaccFields, yacySeedDB.doubleaccFields, null);
MapDataMining.mapIterator it;
it = db.maps(true, false);
while (it.hasNext()) {
final Map<String, String> dna = it.next();
String peerHash = dna.get("key");
if (peerHash.length() < Word.commonHashLength) {
final String peerName = dna.get("Name");
final String peerIP = dna.get("IP");
final String peerPort = dna.get("Port");
while (peerHash.length() < Word.commonHashLength) { peerHash = peerHash + "_"; }
System.err.println("Invalid Peer-Hash found in '" + dbFileName + "': " + peerName + ":" + peerHash + ", http://" + peerIP + ":" + peerPort);
}
}
db.close();
}
} catch (final Exception e) {
Log.logException(e);
}
}