Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
bugfix for startup problems
orbiter6d5d0ac8019d
diff --git a/doc/Download.html b/doc/Download.htmlindex 7290383b5..1ab31c01c 100644--- a/doc/Download.html+++ b/doc/Download.html@@ -65,14 +65,14 @@ You can <a href="http://java.sun.com/j2se/1.4.2/download.html">download the Java</p><p><b>Latest Release:</b>-The latest YaCy release version is 0.40<br>+The latest YaCy release version is 0.41<br>Nightly builds from compiles out of SVN can be obtained from <a href="http://devbin.yacy-forum.de/">http://devbin.yacy-forum.de/</a>.<br><p>Main releases of YaCy are hosted on <a href="http://www.yacy.net/yacy/">yacy.net</a>, <a href="http://developer.berlios.de/projects/yacy/">[email protected]</a> and <a href="http://freshmeat.net/projects/yacyproxy/">[email protected]</a>.<br>Download Mirrors and YaCy Flavours:<ul><li>Generic release of YaCy (all platforms with J2SE 1.4.2: Linux, Mac OS X, Windows, Solaris):</li><ul>- <li><tt>from yacy.net : <a href="http://www.yacy.net/yacy/release/yacy_v0.40_20050816_547.tar.gz"><tt>yacy_v0.40_20050816_547.tar.gz</tt></a></tt></li>+ <li><tt>from yacy.net : <a href="http://www.yacy.net/yacy/release/yacy_v0.41_20051004_848.tar.gz"><tt>yacy_v0.41_20051004_848.tar.gz</tt></a></tt></li><li><tt>from BerliOS.de : <a href="http://download.berlios.de/yacy/yacy_v0.40_20050816_547.tar.gz"><tt>yacy_v0.40_20050816_547.tar.gz</tt></a></tt></li></ul><li>Windows-flavour release of YaCy (same code as generic release, but with convenient Windows-Installer):</li>diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.javaindex 875c05009..e21ebcd3c 100644--- a/source/de/anomic/kelondro/kelondroRecords.java+++ b/source/de/anomic/kelondro/kelondroRecords.java@@ -134,16 +134,16 @@ public class kelondroRecords {private Handle FREEH; // pointer to first element in list of free Nodes, empty = NULprivate short OHBYTEC; // number of extra bytes in each nodeprivate short OHHANDLEC; // number of handles in each node- private int COLWIDTHS[]; // array with widths of columns+ protected int COLWIDTHS[]; // array with widths of columnsprivate Handle HANDLES[]; // array with handlesprivate byte[] TXTPROPS[]; // array with text propertiesprivate int TXTPROPW; // size of a single TXTPROPS element// caching buffer- private HashMap[] XcacheHeaders; // the cache; holds overhead values and key element- private int XcacheSize; // number of cache records- private long XcacheStartup; // startup time; for cache aging- private kelondroMScoreCluster cacheScore; // controls cache aging+ protected HashMap[] XcacheHeaders; // the cache; holds overhead values and key element+ protected int XcacheSize; // number of cache records+ protected long XcacheStartup; // startup time; for cache aging+ protected kelondroMScoreCluster cacheScore; // controls cache agingpublic kelondroRecords(File file, long buffersize /* bytes */,@@ -345,7 +345,7 @@ public class kelondroRecords {return new File(filename);}- private int cacheChunkSize(boolean cacheControl) {+ protected int cacheChunkSize(boolean cacheControl) {return this.headchunksize + element_in_cache + ((cacheControl) ? cache_control_entry : 0);}diff --git a/source/de/anomic/kelondro/kelondroStack.java b/source/de/anomic/kelondro/kelondroStack.javaindex 67cd98bc7..ac8e8b74e 100644--- a/source/de/anomic/kelondro/kelondroStack.java+++ b/source/de/anomic/kelondro/kelondroStack.java@@ -91,6 +91,20 @@ public class kelondroStack extends kelondroRecords {setHandle(toor, null); // reset the toor value}+ public static kelondroStack reset(kelondroStack stack) throws IOException {+ // memorize settings to this file+ File f = new File(stack.filename);+ long bz = stack.XcacheSize * stack.cacheChunkSize(true);+ int[] cols = stack.COLWIDTHS;++ // close and delete the file+ try {stack.close();} catch (Exception e) {};+ if (f.exists()) f.delete();++ // re-open a database with same settings as before+ return new kelondroStack(f, bz, cols);+ }+public class Counter implements Iterator {Handle nextHandle = null;public Counter() throws IOException {diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.javaindex 7dbbac71d..9d478745f 100644--- a/source/de/anomic/plasma/plasmaCrawlBalancer.java+++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java@@ -70,6 +70,11 @@ public class plasmaCrawlBalancer {stack = null;}+ public void reset() throws IOException {+ stack = kelondroStack.reset(stack);+ domainStacks = new HashMap();+ }+public Iterator iterator() {// iterates byte[] - objectsreturn new KeyIterator(stack.iterator());diff --git a/source/de/anomic/plasma/plasmaCrawlNURL.java b/source/de/anomic/plasma/plasmaCrawlNURL.javaindex 12bbb7451..4c98aa24c 100644--- a/source/de/anomic/plasma/plasmaCrawlNURL.java+++ b/source/de/anomic/plasma/plasmaCrawlNURL.java@@ -146,21 +146,13 @@ public class plasmaCrawlNURL extends plasmaURL {public void run() {Iterator i;try {- //System.out.println("init coreStack index");- i = coreStack.iterator(); while (i.hasNext()) stackIndex.add(new String((byte[]) i.next()));- //System.out.println("init limitStack index");- i = limitStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));- //System.out.println("init overhangStack index");- i = overhangStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));- //System.out.println("init remoteStack index");- i = remoteStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));- //System.out.println("init imageStack index");- i = imageStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));- //System.out.println("init movieStack index");- i = movieStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));- //System.out.println("init musicStack index");- i = musicStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));- //System.out.println("finished index init");+ try { i = coreStack.iterator(); while (i.hasNext()) stackIndex.add(new String((byte[]) i.next()));} catch (Exception e) {coreStack.reset();}+ try { i = limitStack.iterator(); while (i.hasNext()) stackIndex.add(new String((byte[]) i.next()));} catch (Exception e) {limitStack.reset();}+ try { i = overhangStack.iterator(); while (i.hasNext()) stackIndex.add(new String((byte[]) i.next()));} catch (Exception e) {overhangStack.reset();}+ try { i = remoteStack.iterator(); while (i.hasNext()) stackIndex.add(new String((byte[]) i.next()));} catch (Exception e) {remoteStack.reset();}+ try { i = imageStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));} catch (Exception e) {imageStack = kelondroStack.reset(imageStack);}+ try { i = movieStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));} catch (Exception e) {movieStack = kelondroStack.reset(movieStack);}+ try { i = musicStack.iterator(); while (i.hasNext()) stackIndex.add(new String(((kelondroRecords.Node) i.next()).getKey()));} catch (Exception e) {musicStack = kelondroStack.reset(musicStack);}} catch (IOException e) {}}}diff --git a/source/de/anomic/tools/enumerateFiles.java b/source/de/anomic/tools/enumerateFiles.javaindex 841670fe8..ef6474b65 100644--- a/source/de/anomic/tools/enumerateFiles.java+++ b/source/de/anomic/tools/enumerateFiles.java@@ -96,17 +96,22 @@ public class enumerateFiles implements Enumeration {if (f.isDirectory()) {t = new TreeSet();String[] l = f.list();- if (l.length == 0) {- if (delete_emptyFolders) {- f.delete();- f = null;+ if (l == null) {+ // f has disappeared+ f = null;+ } else {+ if (l.length == 0) {+ if (delete_emptyFolders) {+ f.delete();+ f = null;+ } else {+ if (!(return_folders)) f = null;+ }} else {+ for (int i = 0; i < l.length; i++) t.add(new File(f, l[i]));+ hierarchy.add(t);if (!(return_folders)) f = null;}- } else {- for (int i = 0; i < l.length; i++) t.add(new File(f, l[i]));- hierarchy.add(t);- if (!(return_folders)) f = null;}} else {if (!(return_files)) f = null;