From 52dd01521803a7517080f1d57d3390ba05e2f821 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 20 Dec 2007 02:46:41 +0000 Subject: [PATCH] new release strategy: the standard release is now built the same way as the pro release a new release type was added: 'embedded' which is the same as the current standard release was this will not have any effect to the next release 0.56, which will still a pro-release on public download the transition the the new release strategy must be done now to enable automatic update by the updated in future releases git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4287 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- build.properties | 5 +-- build.xml | 33 ++++++++++++++--- htroot/ConfigUpdate_p.java | 6 ++-- .../kelondro/kelondroRowCollection.java | 19 +++++++--- .../de/anomic/plasma/plasmaSearchEvent.java | 4 +-- source/de/anomic/yacy/yacyVersion.java | 36 +++++++++++-------- yacy.init | 6 ++-- 7 files changed, 78 insertions(+), 31 deletions(-) diff --git a/build.properties b/build.properties index f71aea54f..aeddde5f1 100644 --- a/build.properties +++ b/build.properties @@ -3,8 +3,9 @@ javacSource=1.4 javacTarget=1.4 # Release Configuration -releaseVersion=0.556 -releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz +releaseVersion=0.557 +stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz +embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz releaseFileParentDir=yacy releaseNr=$Revision$ diff --git a/build.xml b/build.xml index 53295b769..0c625bdbf 100644 --- a/build.xml +++ b/build.xml @@ -155,7 +155,7 @@ - + @@ -517,9 +517,9 @@ - + - + @@ -536,8 +536,33 @@ + + + + + + + + + + + + + + + + + + + - + + + + + + + diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.java index 8be4358d5..6f72f749b 100644 --- a/htroot/ConfigUpdate_p.java +++ b/htroot/ConfigUpdate_p.java @@ -142,7 +142,7 @@ public class ConfigUpdate_p { int relcount = 0; while (i.hasNext()) { release = (yacyVersion) i.next(); - prop.put("candeploy_downloadedreleases_" + relcount + "_name", (release.proRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn); + prop.put("candeploy_downloadedreleases_" + relcount + "_name", (release.fullRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn); prop.put("candeploy_downloadedreleases_" + relcount + "_file", release.name); prop.put("candeploy_downloadedreleases_" + relcount + "_selected", (release == dflt) ? "1" : "0"); relcount++; @@ -158,7 +158,7 @@ public class ConfigUpdate_p { i = releases.iterator(); while (i.hasNext()) { release = (yacyVersion) i.next(); - prop.put("candeploy_availreleases_" + relcount + "_name", (release.proRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn); + prop.put("candeploy_availreleases_" + relcount + "_name", (release.fullRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn); prop.put("candeploy_availreleases_" + relcount + "_url", release.url.toString()); prop.put("candeploy_availreleases_" + relcount + "_selected", "0"); relcount++; @@ -170,7 +170,7 @@ public class ConfigUpdate_p { i = releases.iterator(); while (i.hasNext()) { release = (yacyVersion) i.next(); - prop.put("candeploy_availreleases_" + relcount + "_name", (release.proRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn); + prop.put("candeploy_availreleases_" + relcount + "_name", (release.fullRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn); prop.put("candeploy_availreleases_" + relcount + "_url", release.url.toString()); prop.put("candeploy_availreleases_" + relcount + "_selected", (release == dflt) ? "1" : "0"); relcount++; diff --git a/source/de/anomic/kelondro/kelondroRowCollection.java b/source/de/anomic/kelondro/kelondroRowCollection.java index bdb746cd6..bac96567c 100644 --- a/source/de/anomic/kelondro/kelondroRowCollection.java +++ b/source/de/anomic/kelondro/kelondroRowCollection.java @@ -250,7 +250,6 @@ public class kelondroRowCollection { set(index, a); } - public synchronized void addUnique(kelondroRow.Entry row) { byte[] r = row.bytes(); addUnique(r, 0, r.length); @@ -663,14 +662,26 @@ public class kelondroRowCollection { kelondroRow r = new kelondroRow(new kelondroColumn[]{ new kelondroColumn("hash", kelondroColumn.celltype_string, kelondroColumn.encoder_bytes, yacySeedDB.commonHashLength, "hash")}, kelondroBase64Order.enhancedCoder, 0); + + kelondroRowCollection a = new kelondroRowCollection(r, testsize); + System.out.println("kelondroRowCollection test with size = " + testsize); + long t0 = System.currentTimeMillis(); + random = new Random(0); + for (int i = 0; i < testsize; i++) a.add(randomHash().getBytes()); + random = new Random(0); + for (int i = 0; i < testsize; i++) a.add(randomHash().getBytes()); + a.sort(); + a.uniq(); + long t1 = System.currentTimeMillis(); + System.out.println("create a : " + (t1 - t0) + " milliseconds, " + d(testsize, (t1 - t0)) + " entries/millisecond; a.size() = " + a.size()); + kelondroRowCollection c = new kelondroRowCollection(r, testsize); - System.out.println("kelondroRowCollection test with size = " + testsize); random = new Random(0); - long t0 = System.currentTimeMillis(); + t0 = System.currentTimeMillis(); for (int i = 0; i < testsize; i++) { c.add(randomHash().getBytes()); } - long t1 = System.currentTimeMillis(); + t1 = System.currentTimeMillis(); System.out.println("create c : " + (t1 - t0) + " milliseconds, " + d(testsize, (t1 - t0)) + " entries/millisecond"); kelondroRowCollection d = new kelondroRowCollection(r, testsize); for (int i = 0; i < testsize; i++) { diff --git a/source/de/anomic/plasma/plasmaSearchEvent.java b/source/de/anomic/plasma/plasmaSearchEvent.java index de0c93931..30415b759 100644 --- a/source/de/anomic/plasma/plasmaSearchEvent.java +++ b/source/de/anomic/plasma/plasmaSearchEvent.java @@ -581,12 +581,12 @@ public final class plasmaSearchEvent { long sleeptime = Math.min(600, this.eventTime + (this.query.maximumTime / this.query.displayResults() * ((item % this.query.displayResults()) + 1)) - System.currentTimeMillis()); if (this.resultList.size() <= item + 10) sleeptime = Math.min(sleeptime + 300, 600); if (sleeptime > 0) try {Thread.sleep(sleeptime);} catch (InterruptedException e) {} - System.out.println("+++DEBUG-oneResult+++ (1) sleeping " + sleeptime); + //System.out.println("+++DEBUG-oneResult+++ (1) sleeping " + sleeptime); // then sleep until any result is available (that should not happen) while ((this.resultList.size() <= item) && (anyWorkerAlive())) { try {Thread.sleep(100);} catch (InterruptedException e) {} - System.out.println("+++DEBUG-oneResult+++ (2) sleeping " + 100); + //System.out.println("+++DEBUG-oneResult+++ (2) sleeping " + 100); } } diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.java index e269a63a3..f9c13dd8a 100644 --- a/source/de/anomic/yacy/yacyVersion.java +++ b/source/de/anomic/yacy/yacyVersion.java @@ -54,6 +54,7 @@ public final class yacyVersion implements Comparator, Comparable { public static final float YACY_ACCEPTS_RANKING_TRANSMISSION = (float) 0.414; public static final float YACY_HANDLES_COLLECTION_INDEX = (float) 0.486; public static final float YACY_POVIDES_REMOTECRAWL_LISTS = (float) 0.550; + public static final float YACY_STANDARDREL_IS_PRO = (float) 0.557; // information about latest release, retrieved by other peers release version public static double latestRelease = 0.1; // this value is overwritten when a peer with later version appears @@ -71,7 +72,7 @@ public final class yacyVersion implements Comparator, Comparable { public float releaseNr; public String dateStamp; public int svn; - public boolean proRelease, mainRelease; + public boolean fullRelease, mainRelease; public yacyURL url; public String name; @@ -94,10 +95,13 @@ public final class yacyVersion implements Comparator, Comparable { // cut off tail release = release.substring(0, release.length() - 7); if (release.startsWith("yacy_pro_v")) { - proRelease = true; + fullRelease = true; + release = release.substring(10); + } else if (release.startsWith("yacy_emb_v")) { + fullRelease = false; release = release.substring(10); } else if (release.startsWith("yacy_v")) { - proRelease = false; + fullRelease = false; release = release.substring(6); } else { throw new RuntimeException("release file name '" + release + "' is not valid, wrong prefix"); @@ -124,6 +128,10 @@ public final class yacyVersion implements Comparator, Comparable { } catch (NumberFormatException e) { throw new RuntimeException("release file name '" + release + "' is not valid, '" + comp[2] + "' should be a integer number"); } + if ((this.releaseNr > YACY_STANDARDREL_IS_PRO) && (release.startsWith("yacy_v"))) { + // patch for new release strategy + this.fullRelease = true; + } // finished! we parsed a relase string } @@ -152,7 +160,7 @@ public final class yacyVersion implements Comparator, Comparable { public String toAnchor() { // generates an anchor string that can be used to embed in an html for direct download - return "YaCy " + ((this.proRelease) ? "pro release" : "standard release") + " v" + this.releaseNr + ", SVN " + this.svn + ""; + return "YaCy " + ((this.fullRelease) ? "standard/full release" : "embedded release") + " v" + this.releaseNr + ", SVN " + this.svn + ""; } // static methods: @@ -161,9 +169,9 @@ public final class yacyVersion implements Comparator, Comparable { // construct a virtual release name for this release if (thisVersion == null) { plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard(); - boolean pro = new File(sb.getRootPath(), "libx").exists(); + boolean full = new File(sb.getRootPath(), "libx").exists(); thisVersion = new yacyVersion( - "yacy" + ((pro) ? "_pro" : "") + + "yacy" + ((full) ? "" : "_emb") + "_v" + sb.getConfig("version", "0.1") + "_" + sb.getConfig("vdate", "19700101") + "_" + sb.getConfig("svnRevision", "0") + ".tar.gz"); @@ -177,7 +185,7 @@ public final class yacyVersion implements Comparator, Comparable { // if false, null is returned plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard(); - // check if update process allowes update retrieve + // check if update process allows update retrieve String process = sb.getConfig("update.process", "manual"); if ((!manual) && (!process.equals("auto"))) { yacyCore.log.logInfo("rulebasedUpdateInfo: not an automatic update selected"); @@ -194,9 +202,9 @@ public final class yacyVersion implements Comparator, Comparable { // check if we know that there is a release that is more recent than that which we are using TreeSet[] releasess = yacyVersion.allReleases(true); // {0=promain, 1=prodev, 2=stdmain, 3=stddev} - boolean pro = new File(sb.getRootPath(), "libx").exists(); - yacyVersion latestmain = (releasess[(pro) ? 0 : 2].size() == 0) ? null : (yacyVersion) releasess[(pro) ? 0 : 2].last(); - yacyVersion latestdev = (releasess[(pro) ? 1 : 3].size() == 0) ? null : (yacyVersion) releasess[(pro) ? 1 : 3].last(); + boolean full = new File(sb.getRootPath(), "libx").exists(); + yacyVersion latestmain = (releasess[(full) ? 0 : 2].size() == 0) ? null : (yacyVersion) releasess[(full) ? 0 : 2].last(); + yacyVersion latestdev = (releasess[(full) ? 1 : 3].size() == 0) ? null : (yacyVersion) releasess[(full) ? 1 : 3].last(); String concept = sb.getConfig("update.concept", "any"); String blacklist = sb.getConfig("update.blacklist", ".\\...[123]"); @@ -314,10 +322,10 @@ public final class yacyVersion implements Comparator, Comparable { try { release = new yacyVersion(url); //System.out.println("r " + release.toAnchor()); - if ( release.proRelease && release.mainRelease) promainreleases.add(release); - if ( release.proRelease && !release.mainRelease) prodevreleases.add(release); - if (!release.proRelease && release.mainRelease) stdmainreleases.add(release); - if (!release.proRelease && !release.mainRelease) stddevreleases.add(release); + if ( release.fullRelease && release.mainRelease) promainreleases.add(release); + if ( release.fullRelease && !release.mainRelease) prodevreleases.add(release); + if (!release.fullRelease && release.mainRelease) stdmainreleases.add(release); + if (!release.fullRelease && !release.mainRelease) stddevreleases.add(release); } catch (RuntimeException e) { // the release string was not well-formed. // that might have been another link diff --git a/yacy.init b/yacy.init index d9f1d2374..1b2a97eea 100644 --- a/yacy.init +++ b/yacy.init @@ -558,8 +558,10 @@ filterOutStopwordsFromTopwords=true 50_localcrawl_busysleep__pro=100 50_localcrawl_memprereq=4194304 50_localcrawl_isPaused=false -60_remotecrawlloader_idlesleep=10000 -60_remotecrawlloader_busysleep=2000 +60_remotecrawlloader_idlesleep=60000 +60_remotecrawlloader_idlesleep__pro=10000 +60_remotecrawlloader_busysleep=40000 +60_remotecrawlloader_busysleep__pro=2000 60_remotecrawlloader_memprereq=2097152 60_remotecrawlloader_isPaused=false 62_remotetriggeredcrawl_idlesleep=10000