changed handling of default values and database paths:

- the default files yacy.init and for the network definition is now moved to the path defaults
- the httpProxy.conf is renamed to yacy.conf
- the DATA/INDEX/PUBLIC is renamed to the actual network nickname, which should be freeworld or sciencenet
more menu entries
- added apfelmaennchens alternative search page to the menu
- added the new thread dump page to the server log menu point as submenu
modifications
- modified the thread dump page: sorting by thread type

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4575 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 54cb097ea4
commit 7150b463ff

@ -26,16 +26,16 @@ NICE_VAL=0
JAVA_ARGS="-Djava.awt.headless=true" JAVA_ARGS="-Djava.awt.headless=true"
#get javastart args #get javastart args
if [ -f DATA/SETTINGS/httpProxy.conf ] if [ -f DATA/SETTINGS/yacy.conf ]
then then
# startup memory # startup memory
for i in Xmx Xms; do for i in Xmx Xms; do
j="`grep javastart_$i DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`"; j="`grep javastart_$i DATA/SETTINGS/yacy.conf | sed 's/^[^=]*=//'`";
if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi; if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi;
done done
# Priority # Priority
j="`grep javastart_priority DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`"; j="`grep javastart_priority DATA/SETTINGS/yacy.conf | sed 's/^[^=]*=//'`";
if [ ! -z "$j" ];then if [ ! -z "$j" ];then
if [ -n $j ]; then NICE_VAL=$j; fi; if [ -n $j ]; then NICE_VAL=$j; fi;

@ -390,19 +390,22 @@
<copy todir="${release_main}"> <copy todir="${release_main}">
<fileset dir="."> <fileset dir=".">
<include name="yacy.logging"/> <include name="yacy.logging"/>
<include name="yacy.init"/>
<include name="yacy.yellow"/> <include name="yacy.yellow"/>
<include name="yacy.badwords.example"/> <include name="yacy.badwords.example"/>
<include name="yacy.stopwords"/> <include name="yacy.stopwords"/>
<include name="yacy.parser"/> <include name="yacy.parser"/>
<include name="yacy.network.group"/>
<include name="yacy.network.unit"/>
<include name="httpd.mime"/> <include name="httpd.mime"/>
<include name="superseed.txt"/> <include name="superseed.txt"/>
</fileset> </fileset>
</copy> </copy>
<!-- copy Unix wrappers --> <!-- copy defaults -->
<copy todir="${release_main}/defaults">
<fileset dir="${defaults}"
includes="**/*"/>
</copy>
<!-- copy Unix wrappers -->
<copy todir="${release_main}"> <copy todir="${release_main}">
<fileset dir="."> <fileset dir=".">
<include name="startYACY.sh"/> <include name="startYACY.sh"/>

@ -4,7 +4,7 @@
# These properties will be loaded upon installation. # These properties will be loaded upon installation.
# They are used only once for set-up. # They are used only once for set-up.
# If you make changes to this file and want these to make any effect, # If you make changes to this file and want these to make any effect,
# you must delete the httpProxy.conf file in DATA/SETTINGS # you must delete the yacy.conf file in DATA/SETTINGS
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# the HTTP service configurations # the HTTP service configurations
@ -70,8 +70,8 @@ server.maxTrackingTime = 3600000
# The property here can also be a url where the definition can be loaded. # The property here can also be a url where the definition can be loaded.
# In case of privately managed networks, this configuration must be changed BEFORE it is released # In case of privately managed networks, this configuration must be changed BEFORE it is released
# to the members of the separated network peers. # to the members of the separated network peers.
network.unit.definition = yacy.network.unit network.unit.definition = defaults/yacy.network.freeworld.unit
network.group.definition = yacy.network.group network.group.definition = defaults/yacy.network.group
# Update process properties # Update process properties
# The update server location is given in the network.unit.definition, # The update server location is given in the network.unit.definition,

@ -0,0 +1,31 @@
# Network definition file for the freeworld network
# this is the default standard network for fresh YaCy Peers
# -----------------------------------------------------------------#
# for an explanation please see the file yacy.network.readme #
# this is a work in progress. disabled properties are not yet used #
# -----------------------------------------------------------------#
# general network definition
network.unit.name = freeworld
network.unit.description = Public YaCy Community
network.unit.domain = global
network.unit.search.time = 4
network.unit.dht = true
network.unit.dhtredundancy.junior = 1
network.unit.dhtredundancy.senior = 3
network.unit.bootstrap.seedlist0 = http://www.yacy.net/seed.txt
network.unit.bootstrap.seedlist1 = http://home.arcor.de/hermens/yacy/seed.txt
network.unit.bootstrap.seedlist2 = http://low.audioattack.de/yacy/seed.txt
network.unit.bootstrap.seedlist3 = http://www.lulabad.de/seed.txt
network.unit.bootstrap.seedlist4 = http://www.marcelhenseler.de/yacy/seed.txt
# each network may use different yacy distributions.
# the auto-updater can access network-specific update locations
network.unit.update.location0 = http://yacy.net/index.html
network.unit.update.location1 = http://latest.yacy.de
network.unit.update.location2 = http://www.findenstattsuchen.info/YaCy/latest/index.php
network.unit.update.location3 = http://www.yacystats.de/yacybuild/
# properties for in-protocol response authentification:
network.unit.protocol.control = uncontrolled

@ -1,7 +1,7 @@
# YaCy Network Group Definition # YaCy Network Group Definition
# ----------------------------- # -----------------------------
# This is an addition to the yacy.network.unit configuration file. # This is an addition to the yacy.network.unit configuration file.
# This file is addressed by the network.group.definition property in yacy.init # This file is addressed by the network.group.definition property in defaults/yacy.init
# The purpose of a group within a network is that some parts of a network may be managed independently, # The purpose of a group within a network is that some parts of a network may be managed independently,
# while the content of the network stays private for the whole network, mostly for a special purpose. # while the content of the network stays private for the whole network, mostly for a special purpose.
# This file needs to be configured if someone wants to participate with several peers to the network, # This file needs to be configured if someone wants to participate with several peers to the network,

@ -0,0 +1,25 @@
# Network definition file for the freeworld network
# this is the default standard network for fresh YaCy Peers
# -----------------------------------------------------------------#
# for an explanation please see the file yacy.network.readme #
# this is a work in progress. disabled properties are not yet used #
# -----------------------------------------------------------------#
# general network definition
network.unit.name = intranet
network.unit.description = Private Intranet
network.unit.domain = local
network.unit.dht = false
network.unit.dhtredundancy.junior = 1
network.unit.dhtredundancy.senior = 1
# each network may use different yacy distributions.
# the auto-updater can access network-specific update locations
network.unit.update.location0 = http://yacy.net/index.html
network.unit.update.location1 = http://latest.yacy.de
network.unit.update.location2 = http://www.findenstattsuchen.info/YaCy/latest/index.php
network.unit.update.location3 = http://www.yacystats.de/yacybuild/
# properties for in-protocol response authentification:
network.unit.protocol.control = uncontrolled

@ -6,7 +6,7 @@
# To distinguish between index areas where the shared web index is for a intranet or the public internet, # To distinguish between index areas where the shared web index is for a intranet or the public internet,
# we distinguish local and global networks. Each network type can have different user groups. # we distinguish local and global networks. Each network type can have different user groups.
# Groups can be uncontrolled, moderated or controlled. The whole network may also have a global master. # Groups can be uncontrolled, moderated or controlled. The whole network may also have a global master.
# This file is adressed by the network.unit.definition property in yacy.init. If necessary this # This file is adressed by the network.unit.definition property in defaults/yacy.init. If necessary this
# property can also address a URL where a network definition file can be hosted, so that a network # property can also address a URL where a network definition file can be hosted, so that a network
# can easily be moderated from a single central. In case of the public network of all independent peers # can easily be moderated from a single central. In case of the public network of all independent peers
# for global indexing, the network definition is attached to the release and defines no network master or # for global indexing, the network definition is attached to the release and defines no network master or
@ -42,42 +42,3 @@
# network.unit.administration.manager = <a .yacy or .yacyh - domain, naming the manager peer> # network.unit.administration.manager = <a .yacy or .yacyh - domain, naming the manager peer>
# network.unit.administration.request.authentification.method = 'salted-magic' # network.unit.administration.request.authentification.method = 'salted-magic'
# network.unit.administration.request.authentification.essentials = <any string, a secret password> # network.unit.administration.request.authentification.essentials = <any string, a secret password>
# -----------------------------------------------------------------#
# this is a work in progress. disabled properties are not yet used #
# -----------------------------------------------------------------#
# general network definition
network.unit.name = freeworld
network.unit.description = Public YaCy Community
network.unit.domain = global
network.unit.search.time = 4
network.unit.dht = true
network.unit.dhtredundancy.junior = 1
network.unit.dhtredundancy.senior = 3
network.unit.bootstrap.seedlist0 = http://www.yacy.net/seed.txt
network.unit.bootstrap.seedlist1 = http://home.arcor.de/hermens/yacy/seed.txt
network.unit.bootstrap.seedlist2 = http://low.audioattack.de/yacy/seed.txt
network.unit.bootstrap.seedlist3 = http://www.lulabad.de/seed.txt
network.unit.bootstrap.seedlist4 = http://www.marcelhenseler.de/yacy/seed.txt
# each network may use different yacy distributions.
# the auto-updater can access network-specific update locations
network.unit.update.location0 = http://yacy.net/index.html
network.unit.update.location1 = http://latest.yacy.de
network.unit.update.location2 = http://www.findenstattsuchen.info/YaCy/latest/index.php
network.unit.update.location3 = http://www.yacystats.de/yacybuild/
# properties for in-protocol response authentification:
network.unit.protocol.control = uncontrolled
#network.unit.protocol.request.authentification.method = salted-magic-sim
#network.unit.protocol.request.authentification.essentials =
#network.unit.protocol.response.authentification.method = challenge-pwresponse
#network.unit.protocol.response.authentification.essentials =
# properties for unit access administrator-authentification:
#network.unit.administration.control = uncontrolled
#network.unit.administration.manager =
#network.unit.administration.request.authentification.method = salted-magic
#network.unit.administration.request.authentification.essentials =

@ -44,7 +44,7 @@
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.
</p> </p>
<p> <p>
For explanation please look into yacy.init For explanation please look into defaults/yacy.init
</p> </p>
<select name="options" size="25" style="width: 600px"> <select name="options" size="25" style="width: 600px">
#{options}# #{options}#

@ -23,7 +23,7 @@
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.
</p> </p>
<p> <p>
For explanation please look into yacy.init For explanation please look into defaults/yacy.init
</p> </p>
<select name="options" size="25" style="width: 600px"> <select name="options" size="25" style="width: 600px">
#{options}# #{options}#

@ -50,7 +50,6 @@
import java.io.PrintStream; import java.io.PrintStream;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import de.anomic.http.httpHeader; import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaSwitchboard; import de.anomic.plasma.plasmaSwitchboard;
@ -72,19 +71,10 @@ public final class IndexImport_p {
if (post != null) { if (post != null) {
if (post.containsKey("startIndexDbImport")) { if (post.containsKey("startIndexDbImport")) {
try { try {
// getting the import path
String importPlasmaPath = (String) post.get("importPlasmaPath");
//String importIndexPrimaryPath = (String) post.get("importIndexPrimaryPath");
//String importIndexSecondaryPath = (String) post.get("importIndexSecondaryPath");
String importType = (String) post.get("importType"); String importType = (String) post.get("importType");
String cacheSizeStr = (String) post.get("cacheSize"); int cacheSize = post.getInt("cacheSize", 0);
boolean startImport = true; boolean startImport = true;
HashMap<String, String> initParams = new HashMap<String, String>();
initParams.put("plasmaPath",importPlasmaPath);
initParams.put("cacheSize",cacheSizeStr);
initParams.put("preloadTime","100");
// // check if there is an already running thread with the same import path // // check if there is an already running thread with the same import path
// Thread[] importThreads = new Thread[plasmaDbImporter.runningJobs.activeCount()*2]; // Thread[] importThreads = new Thread[plasmaDbImporter.runningJobs.activeCount()*2];
// activeCount = plasmaDbImporter.runningJobs.enumerate(importThreads); // activeCount = plasmaDbImporter.runningJobs.enumerate(importThreads);
@ -101,7 +91,7 @@ public final class IndexImport_p {
if (startImport) { if (startImport) {
dbImporter importerThread = switchboard.dbImportManager.getNewImporter(importType); dbImporter importerThread = switchboard.dbImportManager.getNewImporter(importType);
if (importerThread != null) { if (importerThread != null) {
importerThread.init(initParams); importerThread.init(switchboard, cacheSize);
importerThread.startIt(); importerThread.startIt();
} }
prop.put("LOCATION",""); prop.put("LOCATION","");

@ -70,7 +70,7 @@ public class PerformanceMemory_p {
// return variable that accumulates replacements // return variable that accumulates replacements
serverObjects prop = new serverObjects(); serverObjects prop = new serverObjects();
if (defaultSettings == null) { if (defaultSettings == null) {
defaultSettings = serverFileUtils.loadHashMap(new File(env.getRootPath(), "yacy.init")); defaultSettings = serverFileUtils.loadHashMap(new File(env.getRootPath(), "defaults/yacy.init"));
} }
prop.put("gc", "0"); prop.put("gc", "0");
if (post != null) { if (post != null) {

@ -62,7 +62,7 @@ public class PerformanceQueues_p {
// return variable that accumulates replacements // return variable that accumulates replacements
plasmaSwitchboard switchboard = (plasmaSwitchboard) sb; plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
serverObjects prop = new serverObjects(); serverObjects prop = new serverObjects();
File defaultSettingsFile = new File(switchboard.getRootPath(), "yacy.init"); File defaultSettingsFile = new File(switchboard.getRootPath(), "defaults/yacy.init");
Map<String, String> defaultSettings = ((post == null) || (!(post.containsKey("submitdefault")))) ? null : serverFileUtils.loadHashMap(defaultSettingsFile); Map<String, String> defaultSettings = ((post == null) || (!(post.containsKey("submitdefault")))) ? null : serverFileUtils.loadHashMap(defaultSettingsFile);
Iterator<String> threads = switchboard.threadNames(); Iterator<String> threads = switchboard.threadNames();
String threadName; String threadName;

@ -26,7 +26,7 @@
<h2>Advanced Settings</h2> <h2>Advanced Settings</h2>
<p>If you want to restore all settings to the default values, <p>If you want to restore all settings to the default values,
but <strong>forgot your administration password</strong>, you must stop the proxy, but <strong>forgot your administration password</strong>, you must stop the proxy,
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again. delete the file 'DATA/SETTINGS/yacy.conf' in the YaCy application root folder and start YaCy again.
</p> </p>
<ul class="settingsMenu"> <ul class="settingsMenu">
<li><a href="?page=ServerAccess">Server Access Settings</a></li> <li><a href="?page=ServerAccess">Server Access Settings</a></li>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>YaCy '#[clientname]#': Threaddump</title> <title>YaCy '#[clientname]#': Thread Dump</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
</head> </head>
<body id="Threaddump"> <body id="Threaddump">
@ -15,7 +15,7 @@
<div> <div>
#(dump)#::#[content]##(/dump)# #(dump)#::<tt>#[content]#</tt>#(/dump)#
</div> </div>
#%env/templates/footer.template%# #%env/templates/footer.template%#
</body> </body>

@ -65,11 +65,9 @@ public class Threaddump_p {
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) { public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
prop = new serverObjects(); prop = new serverObjects();
sb = (plasmaSwitchboard) env; sb = (plasmaSwitchboard) env;
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer(1000);
if (post != null && post.containsKey("createThreaddump")) { if (post != null && post.containsKey("createThreaddump")) {
prop.put("dump", "1"); prop.put("dump", "1");
@ -81,17 +79,17 @@ public class Threaddump_p {
buffer.append("************* Start Thread Dump " + dt + " *******************").append("<br />"); buffer.append("************* Start Thread Dump " + dt + " *******************").append("<br />");
buffer.append("<br /> YaCy Version: " + versionstring + "<br />"); buffer.append("<br /> YaCy Version: " + versionstring + "<br />");
buffer.append("Total Memory = " + (Runtime.getRuntime().totalMemory())).append("<br />"); buffer.append("Total Memory = " + (Runtime.getRuntime().totalMemory())).append("<br />");
buffer.append("Used Memory = " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())).append("<br />"); buffer.append("Used&nbsp;&nbsp;Memory = " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())).append("<br />");
buffer.append("Free Memory = " + (Runtime.getRuntime().freeMemory())).append("<br />"); buffer.append("Free&nbsp;&nbsp;Memory = " + (Runtime.getRuntime().freeMemory())).append("<br />");
buffer.append(" --- --- --- --- <br />"); buffer.append(" --- --- --- --- <br /><br />");
for (Thread thread: stackTraces.keySet()) {
StackTraceElement[] stackTraceElement = (StackTraceElement[]) stackTraces.get(thread); appendStackTraces(buffer, stackTraces, Thread.State.BLOCKED);
buffer.append("Thread= " + thread.getName() + " " + (thread.isDaemon()?"daemon":"") + " id=" + thread.getId() + " " + thread.getState()).append("<br />"); appendStackTraces(buffer, stackTraces, Thread.State.RUNNABLE);
for(int i = 0; i <= (stackTraceElement.length -1); i++) { appendStackTraces(buffer, stackTraces, Thread.State.TIMED_WAITING);
buffer.append(stackTraceElement[i]).append("<br />"); appendStackTraces(buffer, stackTraces, Thread.State.WAITING);
} appendStackTraces(buffer, stackTraces, Thread.State.NEW);
buffer.append("<br />"); appendStackTraces(buffer, stackTraces, Thread.State.TERMINATED);
}
buffer.append("************* End Thread Dump " + dt + " *******************").append("<br />"); buffer.append("************* End Thread Dump " + dt + " *******************").append("<br />");
prop.put("dump_content", buffer.toString()); prop.put("dump_content", buffer.toString());
@ -102,5 +100,19 @@ public class Threaddump_p {
return prop; // return from serverObjects respond() return prop; // return from serverObjects respond()
} }
private static void appendStackTraces(StringBuffer buffer, Map<Thread,StackTraceElement[]> stackTraces, Thread.State stateIn) {
buffer.append("THREADS WITH STATES: " + stateIn.toString()).append("<br />").append("<br />");
for (Thread thread: stackTraces.keySet()) {
StackTraceElement[] stackTraceElement = stackTraces.get(thread);
if (stateIn.equals(thread.getState())) {
buffer.append("Thread= " + thread.getName() + " " + (thread.isDaemon()?"daemon":"") + " id=" + thread.getId() + " " + thread.getState().toString()).append("<br />");
for (int i = 0; i < stackTraceElement.length; i++) {
buffer.append("at " + stackTraceElement[i]).append("<br />");
}
buffer.append("<br />");
}
}
buffer.append("<br />");
}
} }

@ -41,7 +41,7 @@ import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaCrawlProfile; import de.anomic.plasma.plasmaCrawlProfile;
import de.anomic.plasma.plasmaCrawlZURL; import de.anomic.plasma.plasmaCrawlZURL;
import de.anomic.plasma.plasmaSwitchboard; import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.plasma.dbImport.dbImporter; import de.anomic.plasma.dbImport.SitemapImporter;
import de.anomic.server.serverFileUtils; import de.anomic.server.serverFileUtils;
import de.anomic.server.serverObjects; import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch; import de.anomic.server.serverSwitch;
@ -325,13 +325,10 @@ public class WatchCrawler_p {
storeHTCache, true, crawlOrder, xsstopw, xdstopw, xpstopw); storeHTCache, true, crawlOrder, xsstopw, xdstopw, xpstopw);
// create a new sitemap importer // create a new sitemap importer
dbImporter importerThread = switchboard.dbImportManager.getNewImporter("sitemap"); SitemapImporter importerThread = (SitemapImporter) switchboard.dbImportManager.getNewImporter("sitemap");
if (importerThread != null) { if (importerThread != null) {
HashMap<String, String> initParams = new HashMap<String, String>(); importerThread.init(switchboard, 0);
initParams.put("sitemapURL", sitemapURLStr); importerThread.initSitemap(new yacyURL(sitemapURLStr, null), pe);
initParams.put("crawlingProfile", pe.handle());
importerThread.init(initParams);
importerThread.startIt(); importerThread.startIt();
} }
} catch (Exception e) { } catch (Exception e) {

@ -6,7 +6,8 @@
<h3>Search&nbsp;&amp;&nbsp;Browse</h3> <h3>Search&nbsp;&amp;&nbsp;Browse</h3>
<ul class="menu"> <ul class="menu">
<li><a href="/index.html?display=1" accesskey="s" class="MenuItemLink">(old) Search Page</a></li> <li><a href="/index.html?display=1" accesskey="s" class="MenuItemLink">(old) Search Page</a></li>
<li><a href="/yacy/user/ysearch.html?display=1" accesskey="s" class="MenuItemLink">(new) Search Page</a></li> <li><a href="/yacy/user/ysearch.html?display=1" accesskey="s" class="MenuItemLink">(alternative a) Search Page</a></li>
<li><a href="/yacy/ui/" accesskey="s" class="MenuItemLink">(alternative b) Search Page</a></li>
<li><a href="/Ranking_p.html" class="MenuItemLink lock">Ranking Config</a></li> <li><a href="/Ranking_p.html" class="MenuItemLink lock">Ranking Config</a></li>
<li><a href="/Surftips.html?display=1" class="MenuItemLink">Surftips</a></li> <li><a href="/Surftips.html?display=1" class="MenuItemLink">Surftips</a></li>
<li><a href="/Wiki.html?display=1" class="MenuItemLink">Publication</a></li> <li><a href="/Wiki.html?display=1" class="MenuItemLink">Publication</a></li>

@ -3,5 +3,6 @@
<ul class="SubMenu"> <ul class="SubMenu">
<li><a href="/ViewLog_p.html" class="MenuItemLink lock">Server Log</a></li> <li><a href="/ViewLog_p.html" class="MenuItemLink lock">Server Log</a></li>
<li><a href="/LogStatistics_p.html" class="MenuItemLink lock">Log Statistics</a></li> <li><a href="/LogStatistics_p.html" class="MenuItemLink lock">Log Statistics</a></li>
<li><a href="/Threaddump_p.html?createThreaddump=" class="MenuItemLink lock">Thread Dump</a></li>
</ul> </ul>
</div> </div>

@ -229,7 +229,7 @@ The maximum cache size is==Die maximale Gr&ouml;&szlig;e betr&auml;gt
Advanced Config==Erweiterte Einstellungen Advanced Config==Erweiterte Einstellungen
Here are all configuration options from YaCy.==Hier sind alle Konfigurationseinstellungen von YaCy. Here are all configuration options from YaCy.==Hier sind alle Konfigurationseinstellungen von YaCy.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Sie k&ouml;nnen alles &auml;ndern, bedenken Sie aber, dass einige &Auml;nderungen einen Neustart von YaCy erfordern und andere &Auml;nderungen YaCy ganz zum Absturz bringen k&ouml;nnen. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Sie k&ouml;nnen alles &auml;ndern, bedenken Sie aber, dass einige &Auml;nderungen einen Neustart von YaCy erfordern und andere &Auml;nderungen YaCy ganz zum Absturz bringen k&ouml;nnen.
For explanation please look into yacy.init==F&uuml;r eine Erkl&auml;rung sehen Sie bitte in der Datei yacy.init nach For explanation please look into defaults/yacy.init==F&uuml;r eine Erkl&auml;rung sehen Sie bitte in der Datei defaults/yacy.init nach
"Save"=="Speichern" "Save"=="Speichern"
#----------------------------- #-----------------------------
@ -371,7 +371,7 @@ here.==im Profil benutzen.
Advanced Config==Erweiterte Einstellungen Advanced Config==Erweiterte Einstellungen
Here are all configuration options from YaCy.==Hier sind alle Konfigurationseinstellungen von YaCy. Here are all configuration options from YaCy.==Hier sind alle Konfigurationseinstellungen von YaCy.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Sie k&ouml;nnen alles &auml;ndern, bedenken Sie aber, dass einige &Auml;nderungen einen Neustart von YaCy erfordern und andere &Auml;nderungen YaCy ganz zum Absturz bringen k&ouml;nnen. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Sie k&ouml;nnen alles &auml;ndern, bedenken Sie aber, dass einige &Auml;nderungen einen Neustart von YaCy erfordern und andere &Auml;nderungen YaCy ganz zum Absturz bringen k&ouml;nnen.
For explanation please look into yacy.init==Eine Erkl&auml;rung finden Sie in der Datei yacy.init For explanation please look into defaults/yacy.init==Eine Erkl&auml;rung finden Sie in der Datei defaults/yacy.init
"Save"=="Speichern" "Save"=="Speichern"
#----------------------------- #-----------------------------
@ -1599,7 +1599,7 @@ Post-Ranking==Nach-Ranking
Advanced Settings==Erweiterte Einstellungen Advanced Settings==Erweiterte Einstellungen
If you want to restore all settings to the default values,==Wenn Sie alle Einstellungen auf die urspr&uuml;nglichen Werte zur&uuml;cksetzen wollen, If you want to restore all settings to the default values,==Wenn Sie alle Einstellungen auf die urspr&uuml;nglichen Werte zur&uuml;cksetzen wollen,
but <strong>forgot your administration password</strong>, you must stop the proxy,==aber Ihr <strong>Administatorpasswort vergessen haben</strong>, m&uuml;ssen Sie YaCy stoppen, but <strong>forgot your administration password</strong>, you must stop the proxy,==aber Ihr <strong>Administatorpasswort vergessen haben</strong>, m&uuml;ssen Sie YaCy stoppen,
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.==die Datei 'DATA/SETTINGS/httpProxy.conf' im YaCy Hauptordner l&ouml;schen und YaCy neu starten. delete the file 'DATA/SETTINGS/yacy.conf' in the YaCy application root folder and start YaCy again.==die Datei 'DATA/SETTINGS/yacy.conf' im YaCy Hauptordner l&ouml;schen und YaCy neu starten.
Server Access Settings==Server Zugangs-Einstellungen Server Access Settings==Server Zugangs-Einstellungen
Proxy Access Settings==Proxy Zugangs-Einstellungen Proxy Access Settings==Proxy Zugangs-Einstellungen
Content Parser Settings==Inhalt Parser Einstellungen Content Parser Settings==Inhalt Parser Einstellungen

@ -132,7 +132,7 @@ The maximum cache size is==La taille maximale du cache est
Advanced Config==Configuration avancée Advanced Config==Configuration avancée
Here are all configuration options from YaCy.==toutes les options de configuration de YaCy sont ici. Here are all configuration options from YaCy.==toutes les options de configuration de YaCy sont ici.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vous pouvez tout changer, mais certaines options nécessitent un redémarrage et certaines autres peuvent provoquer l'arrêt de YaCy si elles sont mal choisies. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vous pouvez tout changer, mais certaines options nécessitent un redémarrage et certaines autres peuvent provoquer l'arrêt de YaCy si elles sont mal choisies.
For explanation please look into yacy.init==Pour des explications, regardez dans le fichier « yacy.init » s'il vous plait. For explanation please look into defaults/yacy.init==Pour des explications, regardez dans le fichier « defaults/yacy.init » s'il vous plait.
"Save"=="Sauver" "Save"=="Sauver"
#----------------------------- #-----------------------------
@ -141,7 +141,7 @@ For explanation please look into yacy.init==Pour des explications, regardez dans
Advanced Config==Configuration avancée Advanced Config==Configuration avancée
Here are all configuration options from YaCy.==toutes les options de configuration de YaCy sont ici. Here are all configuration options from YaCy.==toutes les options de configuration de YaCy sont ici.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vous pouvez tout changer, mais certaines options nécessitent un redémarrage et certaines autres peuvent provoquer l'arrêt de YaCy si elles sont mal choisies. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vous pouvez tout changer, mais certaines options nécessitent un redémarrage et certaines autres peuvent provoquer l'arrêt de YaCy si elles sont mal choisies.
For explanation please look into yacy.init==Pour des explications, regardez dans le fichier « yacy.init » s'il vous plaît. For explanation please look into defaults/yacy.init==Pour des explications, regardez dans le fichier « defaults/yacy.init » s'il vous plaît.
"Save"=="Sauver" "Save"=="Sauver"
#----------------------------- #-----------------------------
@ -1193,7 +1193,7 @@ YaCy \'\#\[clientname\]\#\': Settings==YaCy '#[clientname]#': Paramètres
<h2>Settings</h2>==<h2>Paramètres</h2> <h2>Settings</h2>==<h2>Paramètres</h2>
If you want to restore all settings to the default values,==Si vous souhaitez rétablir les valeurs par défaut des paramètres, If you want to restore all settings to the default values,==Si vous souhaitez rétablir les valeurs par défaut des paramètres,
but <strong>forgot your administration password</strong>, you must stop the proxy,==Mais que vous avez <strong> oublié votre mot de passe d'administration </ strong>, vous devez arrêter le proxy, but <strong>forgot your administration password</strong>, you must stop the proxy,==Mais que vous avez <strong> oublié votre mot de passe d'administration </ strong>, vous devez arrêter le proxy,
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.==Supprimer le fichier 'DATA/SETTINGS/httpProxy.conf'dans le dossier racine de yacy et démarrer YaCy à nouveau. delete the file 'DATA/SETTINGS/yacy.conf' in the YaCy application root folder and start YaCy again.==Supprimer le fichier 'DATA/SETTINGS/yacy.conf'dans le dossier racine de yacy et démarrer YaCy à nouveau.
Administration Account Settings==Paramètres du compte administrateur Administration Account Settings==Paramètres du compte administrateur
Server Access Settings==Paramètres d'accès au serveur Server Access Settings==Paramètres d'accès au serveur
Proxy Access Settings==Paramètres Proxy Proxy Access Settings==Paramètres Proxy

@ -95,7 +95,7 @@ The maximum cache size is==La dimensione massima della cache &egrave;
Advanced Config==Configurazione avanzata Advanced Config==Configurazione avanzata
Here are all configuration options from YaCy.==Qui ci sono tutte le opzioni di configurazione di YaCy Here are all configuration options from YaCy.==Qui ci sono tutte le opzioni di configurazione di YaCy
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Puoi cambiare tutto, ma alcune opzioni richiedono il restart, e altre opzioni possono far crashare YaCy, se sono utilizzati valori sbagliati. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Puoi cambiare tutto, ma alcune opzioni richiedono il restart, e altre opzioni possono far crashare YaCy, se sono utilizzati valori sbagliati.
For explanation please look into yacy.init==Per spiegazioni per favore guarda in yacy.init For explanation please look into defaults/yacy.init==Per spiegazioni per favore guarda in defaults/yacy.init
"Save"=="Save" "Save"=="Save"
#------------------------------------------------------- #-------------------------------------------------------

@ -156,7 +156,7 @@ Advanced Config==Pokrocile nastavenia
Here are all configuration options from YaCy.==Tu sa nachadzaju vsetky konfiguracne nastavenia YaCy. Here are all configuration options from YaCy.==Tu sa nachadzaju vsetky konfiguracne nastavenia YaCy.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vsetky konfiguracne nastavenia mozu byt zmenene, avsak niektore volby vyzaduju restart a niektore mozu sposobit pad YaCy v pripade zadnia nespravnych hodnot. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vsetky konfiguracne nastavenia mozu byt zmenene, avsak niektore volby vyzaduju restart a niektore mozu sposobit pad YaCy v pripade zadnia nespravnych hodnot.
# NOT USED # NOT USED
#For an explanation of the available options please look into yacy.init==Vysvetlenie jednotlivych volieb najdete v subore yacy.init #For an explanation of the available options please look into defaults/yacy.init==Vysvetlenie jednotlivych volieb najdete v subore defaults/yacy.init
"Save"==Uloz "Save"==Uloz
@ -166,7 +166,7 @@ You can change anything, but some options need a restart, and some options can c
Advanced Config==Pokrocile nastavenia Advanced Config==Pokrocile nastavenia
Here are all configuration options from YaCy.==Tu sa nachadzaju vsetky konfiguracne nastavenia YaCy. Here are all configuration options from YaCy.==Tu sa nachadzaju vsetky konfiguracne nastavenia YaCy.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vsetky konfiguracne nastavenia mozu byt zmenene, avsak niektore volby vyzaduju restart a niektore mozu sposobit pad YaCy v pripade zadnia nespravnych hodnot. You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Vsetky konfiguracne nastavenia mozu byt zmenene, avsak niektore volby vyzaduju restart a niektore mozu sposobit pad YaCy v pripade zadnia nespravnych hodnot.
For explanation please look into yacy.init==Vysvetlenie najdete v subore yacy.init For explanation please look into defaults/yacy.init==Vysvetlenie najdete v subore defaults/yacy.init
"Save"==Uloz "Save"==Uloz
#----------------------------------------------------------- #-----------------------------------------------------------
@ -1467,7 +1467,7 @@ To restrict the access to this page, please set an administrator account and pas
If you want to restore all settings to the default values,==Ak chcete obnovit povodne nastavenia, If you want to restore all settings to the default values,==Ak chcete obnovit povodne nastavenia,
# NOT USED # NOT USED
#but <b>forgot your administration password</b>, you must stop the proxy,==avsak <b>zabudli ste heslo administratora</b>, tak musite YaCy zastavit (prikaz 'stopYaCy.*'), #but <b>forgot your administration password</b>, you must stop the proxy,==avsak <b>zabudli ste heslo administratora</b>, tak musite YaCy zastavit (prikaz 'stopYaCy.*'),
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.==zmazat subor 'DATA/SETTINGS/httpProxy.conf' v domovskom adresary YaCy a YaCy restartovat (prikaz 'startYaCy.*') delete the file 'DATA/SETTINGS/yacy.conf' in the YaCy application root folder and start YaCy again.==zmazat subor 'DATA/SETTINGS/yacy.conf' v domovskom adresary YaCy a YaCy restartovat (prikaz 'startYaCy.*')
# NOT USED # NOT USED
#Administration Account Settings==Nastavenia konta administratora #Administration Account Settings==Nastavenia konta administratora
# NOT USED # NOT USED

@ -14,7 +14,6 @@ public abstract class AbstractImporter extends Thread implements dbImporter{
protected boolean paused = false; protected boolean paused = false;
protected int cacheSize; protected int cacheSize;
protected long preloadTime;
protected long globalStart = System.currentTimeMillis(); protected long globalStart = System.currentTimeMillis();
protected long globalEnd; protected long globalEnd;
@ -37,7 +36,7 @@ public abstract class AbstractImporter extends Thread implements dbImporter{
/** /**
* @see dbImporter#init(HashMap) * @see dbImporter#init(HashMap)
*/ */
public void init(HashMap<String, String> initparams) throws ImporterException { public void init() throws ImporterException {
// initializing the logger and setting a more verbose thread name // initializing the logger and setting a more verbose thread name
this.log = new serverLog("IMPORT_" + this.jobType + "_" + this.jobID); this.log = new serverLog("IMPORT_" + this.jobType + "_" + this.jobID);
this.setName("IMPORT_" + this.jobType + "_" + this.jobID); this.setName("IMPORT_" + this.jobType + "_" + this.jobID);

@ -101,26 +101,21 @@ public class SitemapImporter extends AbstractImporter implements dbImporter {
* @see dbImporter#init(HashMap) * @see dbImporter#init(HashMap)
* @see AbstractImporter#init(HashMap) * @see AbstractImporter#init(HashMap)
*/ */
public void init(HashMap<String, String> initParams) throws ImporterException { public void init(plasmaSwitchboard switchboard, int cacheSize) throws ImporterException {
super.init(initParams); super.init();
}
if (initParams == null || initParams.size() == 0) throw new IllegalArgumentException("Init parameters are missing");
if (!initParams.containsKey("crawlingProfile")) throw new IllegalArgumentException("Init parameters 'crawlingProfile' is missing"); public void initSitemap(yacyURL sitemapURL, plasmaCrawlProfile.entry profileEntry) throws ImporterException {
if (!initParams.containsKey("sitemapURL")) throw new IllegalArgumentException("Init parameters 'sitemapURL' is missing");
try { try {
// getting the sitemap URL // getting the sitemap URL
this.sitemapURL = new yacyURL((String)initParams.get("sitemapURL"), null); this.sitemapURL = sitemapURL;
// getting the crawling profile to use // creating the sitemap parser
plasmaCrawlProfile.entry profileEntry = this.sb.profilesActiveCrawls.getEntry((String)initParams.get("crawlingProfile")); this.parser = new SitemapParser(this.sb,this.sitemapURL, profileEntry);
// creating the sitemap parser
this.parser = new SitemapParser(this.sb,this.sitemapURL,profileEntry);
} catch (Exception e) { } catch (Exception e) {
throw new ImporterException("Unable to initialize Importer",e); throw new ImporterException("Unable to initialize Importer",e);
} }
} }
public void run() { public void run() {
try { try {

@ -1,7 +1,6 @@
package de.anomic.plasma.dbImport; package de.anomic.plasma.dbImport;
import java.util.HashMap; import de.anomic.plasma.plasmaSwitchboard;
public interface dbImporter { public interface dbImporter {
@ -23,8 +22,7 @@ public interface dbImporter {
public String getJobName(); public String getJobName();
public String getJobType(); public String getJobType();
public String getError(); public String getError();
public String getStatus(); public String getStatus();
//public void init(File plasmaPath, File indexPrimaryPath, File indexSecondaryPath, int cacheSize, long preloadTime); public void init(plasmaSwitchboard switchboard, int cacheSize) throws ImporterException;
public void init(HashMap<String, String> initParams) throws ImporterException;
public void startIt(); public void startIt();
} }

@ -46,22 +46,13 @@ public class plasmaCrawlNURLImporter extends AbstractImporter implements dbImpor
return theStatus.toString(); return theStatus.toString();
} }
public void init(HashMap<String, String> initParams) throws ImporterException { public void init(plasmaSwitchboard sb, int cacheSize) throws ImporterException {
super.init(initParams); super.init();
if (initParams == null || initParams.size() == 0) throw new IllegalArgumentException("Init parameters are missing");
if (!initParams.containsKey("plasmaPath")) throw new IllegalArgumentException("Init parameters 'plasmaPath' is missing");
if (!initParams.containsKey("cacheSize")) throw new IllegalArgumentException("Init parameters 'cacheSize' is missing");
if (!initParams.containsKey("preloadTime")) throw new IllegalArgumentException("Init parameters 'preloadTime' is missing");
// TODO: we need more errorhandling here // TODO: we need more errorhandling here
this.plasmaPath = new File((String)initParams.get("plasmaPath")); this.plasmaPath = sb.plasmaPath;
this.cacheSize = cacheSize;
this.cacheSize = Integer.valueOf((String)initParams.get("cacheSize")).intValue();
if (this.cacheSize < 2*1024*1024) this.cacheSize = 8*1024*1024; if (this.cacheSize < 2*1024*1024) this.cacheSize = 8*1024*1024;
this.preloadTime = Long.valueOf((String)initParams.get("preloadTime")).longValue();
File noticeUrlDbFile = new File(plasmaPath,"urlNotice1.db"); File noticeUrlDbFile = new File(plasmaPath,"urlNotice1.db");
File profileDbFile = new File(plasmaPath, plasmaSwitchboard.DBFILE_ACTIVE_CRAWL_PROFILES); File profileDbFile = new File(plasmaPath, plasmaSwitchboard.DBFILE_ACTIVE_CRAWL_PROFILES);

@ -69,20 +69,14 @@ public class plasmaDbImporter extends AbstractImporter implements dbImporter {
* @throws ImporterException * @throws ImporterException
* @see dbImporter#init(HashMap) * @see dbImporter#init(HashMap)
*/ */
public void init(HashMap<String, String> initParams) throws ImporterException { public void init(plasmaSwitchboard db, int cacheSize) throws ImporterException {
super.init(initParams); super.init();
if (initParams == null || initParams.size() == 0) throw new IllegalArgumentException("Init parameters are missing");
if (!initParams.containsKey("primaryPath")) throw new IllegalArgumentException("Init parameters 'primaryPath' is missing");
if (!initParams.containsKey("secondaryPath")) throw new IllegalArgumentException("Init parameters 'secondaryPath' is missing");
if (!initParams.containsKey("cacheSize")) throw new IllegalArgumentException("Init parameters 'cacheSize' is missing");
if (!initParams.containsKey("preloadTime")) throw new IllegalArgumentException("Init parameters 'preloadTime' is missing");
// TODO: we need more errorhandling here // TODO: we need more errorhandling here
this.importPrimaryPath = new File((String)initParams.get("primaryPath")); this.importPrimaryPath = sb.indexPrimaryPath;
this.importSecondaryPath = new File((String)initParams.get("secondaryPath")); this.importSecondaryPath = sb.indexSecondaryPath;
this.cacheSize = Integer.valueOf((String)initParams.get("cacheSize")).intValue(); this.cacheSize = cacheSize;
if (this.cacheSize < 2*1024*1024) this.cacheSize = 8*1024*1024; if (this.cacheSize < 2*1024*1024) this.cacheSize = 8*1024*1024;
// configure import DB // configure import DB
@ -105,7 +99,7 @@ public class plasmaDbImporter extends AbstractImporter implements dbImporter {
} }
this.log.logFine("Initializing source word index db."); this.log.logFine("Initializing source word index db.");
this.importWordIndex = new plasmaWordIndex(this.importPrimaryPath, this.importSecondaryPath, this.log); this.importWordIndex = new plasmaWordIndex(this.importPrimaryPath, this.importSecondaryPath, sb.getConfig("network.unit.name", ""), this.log);
this.importStartSize = this.importWordIndex.size(); this.importStartSize = this.importWordIndex.size();
} }

@ -97,10 +97,27 @@ public final class plasmaCrawlLURL {
// the class object // the class object
kelondroIndex urlIndexFile; kelondroIndex urlIndexFile;
public plasmaCrawlLURL(File indexPath) { public plasmaCrawlLURL(File indexSecondaryRoot, String networkName) {
super(); super();
File indexSecondaryPath = new File(indexSecondaryRoot, networkName);
urlIndexFile = new kelondroSplitTable(new File(indexPath, "PUBLIC/TEXT"), "urls", indexURLEntry.rowdef, false); File indexSecondaryTextLocation = new File(indexSecondaryPath, "TEXT");
if (!indexSecondaryTextLocation.exists()) {
// patch old index locations; the secondary path is patched in plasmaCrawlLURL
File oldSecondaryPath = new File(new File(indexSecondaryRoot, "PUBLIC"), "TEXT");
File oldSecondaryTextLocation = new File(new File(indexSecondaryRoot, "PUBLIC"), "TEXT");
if (oldSecondaryPath.exists() && oldSecondaryTextLocation.exists()) {
// move the text folder from the old location to the new location
assert !indexSecondaryTextLocation.exists();
indexSecondaryTextLocation.mkdirs();
if (oldSecondaryTextLocation.renameTo(indexSecondaryTextLocation)) {
if (!oldSecondaryPath.delete()) oldSecondaryPath.deleteOnExit();
} else {
indexSecondaryTextLocation = oldSecondaryTextLocation; // emergency case: stay with old directory
}
}
}
urlIndexFile = new kelondroSplitTable(indexSecondaryTextLocation, "urls", indexURLEntry.rowdef, false);
// init result stacks // init result stacks
externResultStack = new LinkedList<String>(); externResultStack = new LinkedList<String>();
@ -676,7 +693,7 @@ public final class plasmaCrawlLURL {
} catch (MalformedURLException e) {} } catch (MalformedURLException e) {}
if (args[0].equals("-l")) try { if (args[0].equals("-l")) try {
// arg 1 is path to URLCache // arg 1 is path to URLCache
final plasmaCrawlLURL urls = new plasmaCrawlLURL(new File(args[2])); final plasmaCrawlLURL urls = new plasmaCrawlLURL(new File(args[2]), "freeworld");
final Iterator<indexURLEntry> enu = urls.entries(true, null); final Iterator<indexURLEntry> enu = urls.entries(true, null);
while (enu.hasNext()) { while (enu.hasNext()) {
System.out.println(enu.next().toString()); System.out.println(enu.next().toString());

@ -192,7 +192,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
// storage management // storage management
public File htCachePath; public File htCachePath;
private File plasmaPath; public File plasmaPath;
public File indexPrimaryPath, indexSecondaryPath; public File indexPrimaryPath, indexSecondaryPath;
public File listsPath; public File listsPath;
public File htDocsPath; public File htDocsPath;
@ -710,8 +710,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
* <p>Name of the setting specifying the folder beginning from the YaCy-installation's top-folder, where all * <p>Name of the setting specifying the folder beginning from the YaCy-installation's top-folder, where all
* databases containing queues are stored</p> * databases containing queues are stored</p>
*/ */
public static final String DBPATH = "dbPath"; public static final String PLASMA_PATH = "dbPath";
public static final String DBPATH_DEFAULT = "DATA/PLASMADB"; public static final String PLASMA_PATH_DEFAULT = "DATA/PLASMADB";
/** /**
* <p><code>public static final String <strong>HTCACHE_PATH</strong> = "proxyCache"</code></p> * <p><code>public static final String <strong>HTCACHE_PATH</strong> = "proxyCache"</code></p>
* <p>Name of the setting specifying the folder beginning from the YaCy-installation's top-folder, where all * <p>Name of the setting specifying the folder beginning from the YaCy-installation's top-folder, where all
@ -854,7 +854,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
* <p><code>public static final String <strong>DBFILE_CRAWL_PROFILES</strong> = "crawlProfiles0.db"</code> * <p><code>public static final String <strong>DBFILE_CRAWL_PROFILES</strong> = "crawlProfiles0.db"</code>
* <p>Name of the file containing the database holding all recent crawl profiles</p> * <p>Name of the file containing the database holding all recent crawl profiles</p>
* *
* @see plasmaSwitchboard#DBPATH for the folder this file lies in * @see plasmaSwitchboard#PLASMA_PATH for the folder this file lies in
*/ */
public static final String DBFILE_ACTIVE_CRAWL_PROFILES = "crawlProfilesActive1.db"; public static final String DBFILE_ACTIVE_CRAWL_PROFILES = "crawlProfilesActive1.db";
public static final String DBFILE_PASSIVE_CRAWL_PROFILES = "crawlProfilesPassive1.db"; public static final String DBFILE_PASSIVE_CRAWL_PROFILES = "crawlProfilesPassive1.db";
@ -862,7 +862,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
* <p><code>public static final String <strong>DBFILE_CRAWL_ROBOTS</strong> = "crawlRobotsTxt.db"</code></p> * <p><code>public static final String <strong>DBFILE_CRAWL_ROBOTS</strong> = "crawlRobotsTxt.db"</code></p>
* <p>Name of the file containing the database holding all <code>robots.txt</code>-entries of the lately crawled domains</p> * <p>Name of the file containing the database holding all <code>robots.txt</code>-entries of the lately crawled domains</p>
* *
* @see plasmaSwitchboard#DBPATH for the folder this file lies in * @see plasmaSwitchboard#PLASMA_PATH for the folder this file lies in
*/ */
public static final String DBFILE_CRAWL_ROBOTS = "crawlRobotsTxt1.db"; public static final String DBFILE_CRAWL_ROBOTS = "crawlRobotsTxt1.db";
/** /**
@ -891,8 +891,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
this.log.logConfig("Remote proxy configuration:\n" + this.remoteProxyConfig.toString()); this.log.logConfig("Remote proxy configuration:\n" + this.remoteProxyConfig.toString());
// load network configuration into settings // load network configuration into settings
String networkUnitDefinition = getConfig("network.unit.definition", "yacy.network.unit"); String networkUnitDefinition = getConfig("network.unit.definition", "defaults/yacy.network.freeworld.unit");
String networkGroupDefinition = getConfig("network.group.definition", "yacy.network.group"); String networkGroupDefinition = getConfig("network.group.definition", "yacy.network.group");
// patch old values
if (networkUnitDefinition.equals("yacy.network.unit")) networkUnitDefinition = "defaults/yacy.network.freeworld.unit";
// include additional network definition properties into our settings // include additional network definition properties into our settings
// note that these properties cannot be set in the application because they are // note that these properties cannot be set in the application because they are
@ -947,7 +949,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
this.acceptLocalURLs = "local.any".indexOf(getConfig("network.unit.domain", "global")) >= 0; this.acceptLocalURLs = "local.any".indexOf(getConfig("network.unit.domain", "global")) >= 0;
// load values from configs // load values from configs
this.plasmaPath = getConfigPath(DBPATH, DBPATH_DEFAULT); this.plasmaPath = getConfigPath(PLASMA_PATH, PLASMA_PATH_DEFAULT);
this.log.logConfig("Plasma DB Path: " + this.plasmaPath.toString()); this.log.logConfig("Plasma DB Path: " + this.plasmaPath.toString());
this.indexPrimaryPath = getConfigPath(INDEX_PRIMARY_PATH, INDEX_PATH_DEFAULT); this.indexPrimaryPath = getConfigPath(INDEX_PRIMARY_PATH, INDEX_PATH_DEFAULT);
this.log.logConfig("Index Primary Path: " + this.indexPrimaryPath.toString()); this.log.logConfig("Index Primary Path: " + this.indexPrimaryPath.toString());
@ -965,7 +967,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
// start indexing management // start indexing management
log.logConfig("Starting Indexing Management"); log.logConfig("Starting Indexing Management");
wordIndex = new plasmaWordIndex(indexPrimaryPath, indexSecondaryPath, log); String networkName = getConfig("network.unit.name", "");
wordIndex = new plasmaWordIndex(indexPrimaryPath, indexSecondaryPath, networkName, log);
// start yacy core // start yacy core
log.logConfig("Starting YaCy Protocol Core"); log.logConfig("Starting YaCy Protocol Core");
@ -1211,7 +1214,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
CRDist1Percent = 30 CRDist1Percent = 30
CRDist1Target = kaskelix.de:8080,yacy.dyndns.org:8000,suma-lab.de:8080 CRDist1Target = kaskelix.de:8080,yacy.dyndns.org:8000,suma-lab.de:8080
**/ **/
rankingOn = getConfig(RANKING_DIST_ON, "true").equals("true") && getConfig("network.unit.name", "").equals("freeworld"); rankingOn = getConfig(RANKING_DIST_ON, "true").equals("true") && networkName.equals("freeworld");
rankingOwnDistribution = new plasmaRankingDistribution(log, new File(rankingPath, getConfig(RANKING_DIST_0_PATH, plasmaRankingDistribution.CR_OWN)), (int) getConfigLong(RANKING_DIST_0_METHOD, plasmaRankingDistribution.METHOD_ANYSENIOR), (int) getConfigLong(RANKING_DIST_0_METHOD, 0), getConfig(RANKING_DIST_0_TARGET, "")); rankingOwnDistribution = new plasmaRankingDistribution(log, new File(rankingPath, getConfig(RANKING_DIST_0_PATH, plasmaRankingDistribution.CR_OWN)), (int) getConfigLong(RANKING_DIST_0_METHOD, plasmaRankingDistribution.METHOD_ANYSENIOR), (int) getConfigLong(RANKING_DIST_0_METHOD, 0), getConfig(RANKING_DIST_0_TARGET, ""));
rankingOtherDistribution = new plasmaRankingDistribution(log, new File(rankingPath, getConfig(RANKING_DIST_1_PATH, plasmaRankingDistribution.CR_OTHER)), (int) getConfigLong(RANKING_DIST_1_METHOD, plasmaRankingDistribution.METHOD_MIXEDSENIOR), (int) getConfigLong(RANKING_DIST_1_METHOD, 30), getConfig(RANKING_DIST_1_TARGET, "kaskelix.de:8080,yacy.dyndns.org:8000,suma-lab.de:8080")); rankingOtherDistribution = new plasmaRankingDistribution(log, new File(rankingPath, getConfig(RANKING_DIST_1_PATH, plasmaRankingDistribution.CR_OTHER)), (int) getConfigLong(RANKING_DIST_1_METHOD, plasmaRankingDistribution.METHOD_MIXEDSENIOR), (int) getConfigLong(RANKING_DIST_1_METHOD, 30), getConfig(RANKING_DIST_1_TARGET, "kaskelix.de:8080,yacy.dyndns.org:8000,suma-lab.de:8080"));

@ -73,19 +73,37 @@ public final class plasmaWordIndex implements indexRI {
private int flushsize; private int flushsize;
public final plasmaCrawlLURL loadedURL; public final plasmaCrawlLURL loadedURL;
public plasmaWordIndex(File indexPrimaryRoot, File indexSecondaryRoot, serverLog log) { public plasmaWordIndex(File indexPrimaryRoot, File indexSecondaryRoot, String networkName, serverLog log) {
File textindexcache = new File(indexPrimaryRoot, "PUBLIC/TEXT/RICACHE"); File indexPrimaryPath = new File(indexPrimaryRoot, networkName);
File indexPrimaryTextLocation = new File(indexPrimaryPath, "TEXT");
if (!indexPrimaryTextLocation.exists()) {
// patch old index locations; the secondary path is patched in plasmaCrawlLURL
File oldPrimaryPath = new File(new File(indexPrimaryRoot, "PUBLIC"), "TEXT");
File oldPrimaryTextLocation = new File(new File(indexPrimaryRoot, "PUBLIC"), "TEXT");
if (oldPrimaryPath.exists() && oldPrimaryTextLocation.exists()) {
// move the text folder from the old location to the new location
assert !indexPrimaryTextLocation.exists();
indexPrimaryTextLocation.mkdirs();
if (oldPrimaryTextLocation.renameTo(indexPrimaryTextLocation)) {
if (!oldPrimaryPath.delete()) oldPrimaryPath.deleteOnExit();
} else {
indexPrimaryTextLocation = oldPrimaryTextLocation; // emergency case: stay with old directory
}
}
}
File textindexcache = new File(indexPrimaryTextLocation, "RICACHE");
if (!(textindexcache.exists())) textindexcache.mkdirs(); if (!(textindexcache.exists())) textindexcache.mkdirs();
this.dhtOutCache = new indexRAMRI(textindexcache, indexRWIRowEntry.urlEntryRow, wCacheMaxChunk, wCacheMaxAge, "dump1.array", log); this.dhtOutCache = new indexRAMRI(textindexcache, indexRWIRowEntry.urlEntryRow, wCacheMaxChunk, wCacheMaxAge, "dump1.array", log);
this.dhtInCache = new indexRAMRI(textindexcache, indexRWIRowEntry.urlEntryRow, wCacheMaxChunk, wCacheMaxAge, "dump2.array", log); this.dhtInCache = new indexRAMRI(textindexcache, indexRWIRowEntry.urlEntryRow, wCacheMaxChunk, wCacheMaxAge, "dump2.array", log);
// create collections storage path // create collections storage path
File textindexcollections = new File(indexPrimaryRoot, "PUBLIC/TEXT/RICOLLECTION"); File textindexcollections = new File(indexPrimaryTextLocation, "RICOLLECTION");
if (!(textindexcollections.exists())) textindexcollections.mkdirs(); if (!(textindexcollections.exists())) textindexcollections.mkdirs();
this.collections = new indexCollectionRI(textindexcollections, "collection", maxCollectionPartition, indexRWIRowEntry.urlEntryRow); this.collections = new indexCollectionRI(textindexcollections, "collection", maxCollectionPartition, indexRWIRowEntry.urlEntryRow);
// create LURL-db // create LURL-db
loadedURL = new plasmaCrawlLURL(indexSecondaryRoot); loadedURL = new plasmaCrawlLURL(indexSecondaryRoot, networkName);
// performance settings // performance settings
busyCacheFlush = false; busyCacheFlush = false;

@ -0,0 +1,231 @@
// opensearchdescriptionReader.java
// (C) 2008 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany
// first published 11.03.2008 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
// $LastChangedRevision: 1986 $
// $LastChangedBy: orbiter $
//
// LICENSE
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package de.anomic.xml;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import de.anomic.server.serverByteBuffer;
import de.anomic.server.logging.serverLog;
public class opensearchdescriptionReader extends DefaultHandler {
// statics for item generation and automatic categorization
static int guidcount = 0;
private static final String recordTag = "OpenSearchDescription";
private static final String[] tagsDef = new String[]{
"ShortName",
"LongName",
"Image",
"Language",
"OutputEncoding",
"InputEncoding",
"AdultContent",
"Description",
"Url",
"Developer",
"Query",
"Tags",
"Contact",
"Attribution",
"SyndicationRight"
};
/*
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>YaCy/#[clientname]#</ShortName>
<LongName>YaCy.net - #[SearchPageGreeting]#</LongName>
<Image type="image/gif">http://#[thisaddress]#/env/grafics/yacy.gif</Image>
<Language>en-us</Language>
<OutputEncoding>UTF-8</OutputEncoding>
<InputEncoding>UTF-8</InputEncoding>
<AdultContent>true</AdultContent>
<Description>YaCy is an open-source GPL-licensed software that can be used for stand-alone search engine installations or as a client for a multi-user P2P-based web indexing cluster. This is the access to peer '#[clientname]#'.</Description>
<Url type="application/rss+xml" method="GET" template="http://#[thisaddress]#/yacysearch.rss?search={searchTerms}&amp;Enter=Search" />
<Developer>See http://developer.berlios.de/projects/yacy/</Developer>
<Query role="example" searchTerms="yacy" />
<Tags>YaCy P2P Web Search</Tags>
<Contact>See http://#[thisaddress]#/ViewProfile.html?hash=localhash</Contact>
<Attribution>YaCy Software &amp;copy; 2004-2007 by Michael Christen et al., YaCy.net; Content: ask peer owner</Attribution>
<SyndicationRight>open</SyndicationRight>
</OpenSearchDescription>
*/
private static final HashSet<String> tags = new HashSet<String>();
static {
for (int i = 0; i < tagsDef.length; i++) {
tags.add(tagsDef[i]);
}
}
// class variables
private Item channel, item;
private StringBuffer buffer;
private boolean parsingChannel;
private String imageURL;
private ArrayList<String> itemsGUID; // a list of GUIDs, so the items can be retrieved by a specific order
private HashMap<String, Item> items; // a guid:Item map
public opensearchdescriptionReader() {
itemsGUID = new ArrayList<String>();
items = new HashMap<String, Item>();
buffer = new StringBuffer();
item = null;
channel = null;
parsingChannel = false;
}
public opensearchdescriptionReader(String path) {
this();
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
saxParser.parse(path, this);
} catch (Exception e) {
e.printStackTrace();
}
}
public opensearchdescriptionReader(InputStream stream) {
this();
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
saxParser.parse(stream, this);
} catch (Exception e) {
e.printStackTrace();
}
}
public static opensearchdescriptionReader parse(byte[] a) {
// check integrity of array
if ((a == null) || (a.length == 0)) {
serverLog.logWarning("opensearchdescriptionReader", "response=null");
return null;
}
if (a.length < 100) {
serverLog.logWarning("opensearchdescriptionReader", "response=" + new String(a));
return null;
}
if (!serverByteBuffer.equals(a, "<?xml".getBytes())) {
serverLog.logWarning("opensearchdescriptionReader", "response does not contain valid xml");
return null;
}
String end = new String(a, a.length - 10, 10);
if (end.indexOf("rss") < 0) {
serverLog.logWarning("opensearchdescriptionReader", "response incomplete");
return null;
}
// make input stream
ByteArrayInputStream bais = new ByteArrayInputStream(a);
// parse stream
opensearchdescriptionReader reader = null;
try {
reader = new opensearchdescriptionReader(bais);
} catch (Exception e) {
serverLog.logWarning("opensearchdescriptionReader", "parse exception: " + e);
return null;
}
try { bais.close(); } catch (IOException e) {}
return reader;
}
public void startElement(String uri, String name, String tag, Attributes atts) throws SAXException {
if ("channel".equals(tag)) {
channel = new Item();
parsingChannel = true;
}
}
public void endElement(String uri, String name, String tag) {
if (tag == null) return;
if ("channel".equals(tag)) {
parsingChannel = false;
} else if (parsingChannel) {
String value = buffer.toString().trim();
buffer.setLength(0);
if (tags.contains(tag)) channel.setValue(tag, value);
}
}
public void characters(char ch[], int start, int length) {
if (parsingChannel) {
buffer.append(ch, start, length);
}
}
public Item getChannel() {
return channel;
}
public Item getItem(int i) {
// retrieve item by order number
return getItem((String) itemsGUID.get(i));
}
public Item getItem(String guid) {
// retrieve item by guid
return (Item) items.get(guid);
}
public int items() {
return items.size();
}
public String getImage() {
return this.imageURL;
}
public static class Item {
private HashMap<String, String> map;
public Item() {
this.map = new HashMap<String, String>();
this.map.put("guid", Long.toHexString(System.currentTimeMillis()) + ":" + guidcount++);
}
public void setValue(String name, String value) {
map.put(name, value);
}
}
}

@ -1094,7 +1094,7 @@ public final class yacyClient {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("yacyClient Test"); System.out.println("yacyClient Test");
try { try {
final plasmaSwitchboard sb = new plasmaSwitchboard(new File(args[0]), "httpProxy.init", "DATA/SETTINGS/httpProxy.conf", false); final plasmaSwitchboard sb = new plasmaSwitchboard(new File(args[0]), "httpProxy.init", "DATA/SETTINGS/yacy.conf", false);
/*final yacyCore core =*/ new yacyCore(sb); /*final yacyCore core =*/ new yacyCore(sb);
yacyCore.peerActions.loadSeedLists(); yacyCore.peerActions.loadSeedLists();
final yacySeed target = yacyCore.seedDB.getConnected(args[1]); final yacySeed target = yacyCore.seedDB.getConnected(args[1]);

@ -204,7 +204,7 @@ public class yacyPeerActions {
} catch (IOException e) { } catch (IOException e) {
// this is when wget fails, commonly because of timeout // this is when wget fails, commonly because of timeout
yacyCore.log.logWarning("BOOTSTRAP: failed (1) to load seeds from seed-list URL " + seedListFileURL + ": " + e.getMessage(), e); yacyCore.log.logWarning("BOOTSTRAP: failed (1) to load seeds from seed-list URL " + seedListFileURL + ": " + e.getMessage());
} catch (Exception e) { } catch (Exception e) {
// this is when wget fails; may be because of missing internet connection // this is when wget fails; may be because of missing internet connection
yacyCore.log.logSevere("BOOTSTRAP: failed (2) to load seeds from seed-list URL " + seedListFileURL + ": " + e.getMessage(), e); yacyCore.log.logSevere("BOOTSTRAP: failed (2) to load seeds from seed-list URL " + seedListFileURL + ": " + e.getMessage(), e);

@ -60,9 +60,9 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<ya
// information about latest release, retrieved from download pages // information about latest release, retrieved from download pages
// this static information should be overwritten by network-specific locations // this static information should be overwritten by network-specific locations
// for details see yacy.network.unit // for details see defaults/yacy.network.freeworld.unit
private static HashMap<yacyURL, DevMain> latestReleases = new HashMap<yacyURL, DevMain>(); private static HashMap<yacyURL, DevMain> latestReleases = new HashMap<yacyURL, DevMain>();
public static ArrayList<yacyURL> latestReleaseLocations = new ArrayList<yacyURL>(); // will be initialized with value in yacy.network.unit public static ArrayList<yacyURL> latestReleaseLocations = new ArrayList<yacyURL>(); // will be initialized with value in defaults/yacy.network.freeworld.unit
// private static release info about this release; is generated only once and can be retrieved by thisVersion() // private static release info about this release; is generated only once and can be retrieved by thisVersion()
private static yacyVersion thisVersion = null; private static yacyVersion thisVersion = null;

@ -220,7 +220,13 @@ public final class yacy {
f.deleteOnExit(); f.deleteOnExit();
pro = new File(homePath, "libx").exists(); pro = new File(homePath, "libx").exists();
sb = new plasmaSwitchboard(homePath, "yacy.init", "DATA/SETTINGS/httpProxy.conf", pro); String oldconf = "DATA/SETTINGS/httpProxy.conf";
String newconf = "DATA/SETTINGS/yacy.conf";
File oldconffile = new File(homePath, oldconf);
if (oldconffile.exists()) {
oldconffile.renameTo(new File(homePath, newconf));
}
sb = new plasmaSwitchboard(homePath, "defaults/yacy.init", newconf, pro);
sbSync.V(); // signal that the sb reference was set sbSync.V(); // signal that the sb reference was set
// save information about available memory at startup time // save information about available memory at startup time
@ -590,7 +596,7 @@ public final class yacy {
* @param homePath path to the YaCy directory * @param homePath path to the YaCy directory
* @param dbcache cache size in MB * @param dbcache cache size in MB
*/ */
public static void minimizeUrlDB(File homePath) { public static void minimizeUrlDB(File homePath, String networkName) {
// run with "java -classpath classes yacy -minimizeUrlDB" // run with "java -classpath classes yacy -minimizeUrlDB"
try {serverLog.configureLogging(homePath, new File(homePath, "DATA/LOG/yacy.logging"));} catch (Exception e) {} try {serverLog.configureLogging(homePath, new File(homePath, "DATA/LOG/yacy.logging"));} catch (Exception e) {}
File indexPrimaryRoot = new File(homePath, "DATA/INDEX"); File indexPrimaryRoot = new File(homePath, "DATA/INDEX");
@ -601,15 +607,15 @@ public final class yacy {
log.logInfo("STARTING URL CLEANUP"); log.logInfo("STARTING URL CLEANUP");
// db containing all currently loades urls // db containing all currently loades urls
plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(indexSecondaryRoot); plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(indexSecondaryRoot, networkName);
// db used to hold all neede urls // db used to hold all neede urls
plasmaCrawlLURL minimizedUrlDB = new plasmaCrawlLURL(indexRoot2); plasmaCrawlLURL minimizedUrlDB = new plasmaCrawlLURL(indexRoot2, networkName);
int cacheMem = (int)(serverMemory.max() - serverMemory.total()); int cacheMem = (int)(serverMemory.max() - serverMemory.total());
if (cacheMem < 2048000) throw new OutOfMemoryError("Not enough memory available to start clean up."); if (cacheMem < 2048000) throw new OutOfMemoryError("Not enough memory available to start clean up.");
plasmaWordIndex wordIndex = new plasmaWordIndex(indexPrimaryRoot, indexSecondaryRoot, log); plasmaWordIndex wordIndex = new plasmaWordIndex(indexPrimaryRoot, indexSecondaryRoot, networkName, log);
Iterator<indexContainer> indexContainerIterator = wordIndex.wordContainers("AAAAAAAAAAAA", false, false); Iterator<indexContainer> indexContainerIterator = wordIndex.wordContainers("AAAAAAAAAAAA", false, false);
long urlCounter = 0, wordCounter = 0; long urlCounter = 0, wordCounter = 0;
@ -779,11 +785,11 @@ public final class yacy {
* *
* @param homePath Root-Path where all information is to be found. * @param homePath Root-Path where all information is to be found.
*/ */
private static void urldbcleanup(File homePath) { private static void urldbcleanup(File homePath, String networkName) {
File root = homePath; File root = homePath;
File indexroot = new File(root, "DATA/INDEX"); File indexroot = new File(root, "DATA/INDEX");
try {serverLog.configureLogging(homePath, new File(homePath, "DATA/LOG/yacy.logging"));} catch (Exception e) {} try {serverLog.configureLogging(homePath, new File(homePath, "DATA/LOG/yacy.logging"));} catch (Exception e) {}
plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(indexroot); plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(indexroot, networkName);
currentUrlDB.urldbcleanup(); currentUrlDB.urldbcleanup();
currentUrlDB.close(); currentUrlDB.close();
} }
@ -800,7 +806,7 @@ public final class yacy {
try { try {
Iterator<indexContainer> indexContainerIterator = null; Iterator<indexContainer> indexContainerIterator = null;
if (resource.equals("all")) { if (resource.equals("all")) {
WordIndex = new plasmaWordIndex(indexPrimaryRoot, indexSecondaryRoot, log); WordIndex = new plasmaWordIndex(indexPrimaryRoot, indexSecondaryRoot, "freeworld", log);
indexContainerIterator = WordIndex.wordContainers(wordChunkStartHash, false, false); indexContainerIterator = WordIndex.wordContainers(wordChunkStartHash, false, false);
} }
int counter = 0; int counter = 0;
@ -925,7 +931,7 @@ public final class yacy {
args = shift(args, 1, 2); args = shift(args, 1, 2);
} }
if (args.length == 2) applicationRoot= new File(args[1]); if (args.length == 2) applicationRoot= new File(args[1]);
minimizeUrlDB(applicationRoot); minimizeUrlDB(applicationRoot, "freeworld");
} else if ((args.length >= 1) && (args[0].toLowerCase().equals("-testpeerdb"))) { } else if ((args.length >= 1) && (args[0].toLowerCase().equals("-testpeerdb"))) {
if (args.length == 2) { if (args.length == 2) {
applicationRoot = new File(args[1]); applicationRoot = new File(args[1]);
@ -953,7 +959,7 @@ public final class yacy {
} else if ((args.length >= 1) && (args[0].toLowerCase().equals("-urldbcleanup"))) { } else if ((args.length >= 1) && (args[0].toLowerCase().equals("-urldbcleanup"))) {
// generate a url list and save it in a file // generate a url list and save it in a file
if (args.length == 2) applicationRoot= new File(args[1]); if (args.length == 2) applicationRoot= new File(args[1]);
urldbcleanup(applicationRoot); urldbcleanup(applicationRoot, "freeworld");
} else if ((args.length >= 1) && (args[0].toLowerCase().equals("-rwihashlist"))) { } else if ((args.length >= 1) && (args[0].toLowerCase().equals("-rwihashlist"))) {
// generate a url list and save it in a file // generate a url list and save it in a file
String domain = "all"; String domain = "all";

@ -14,7 +14,7 @@ set jms=
set javacmd=-Xmx64m -Xms10m set javacmd=-Xmx64m -Xms10m
set priolvl=0 set priolvl=0
set priority=/NORMAL set priority=/NORMAL
if exist DATA\SETTINGS\httpProxy.conf GoTo :GETSTARTOPTS if exist DATA\SETTINGS\yacy.conf GoTo :GETSTARTOPTS
:STARTJAVA :STARTJAVA
Rem Starting YaCy Rem Starting YaCy
@ -38,7 +38,7 @@ del DATA\yacy.restart
Rem This target is used to read java runtime parameters out of the yacy config file Rem This target is used to read java runtime parameters out of the yacy config file
:GETSTARTOPTS :GETSTARTOPTS
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do ( for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\yacy.conf) do (
if "%%i"=="javastart_Xmx" set jmx=%%j if "%%i"=="javastart_Xmx" set jmx=%%j
if "%%i"=="javastart_Xms" set jms=%%j if "%%i"=="javastart_Xms" set jms=%%j
if "%%i"=="port" set port=%%j if "%%i"=="port" set port=%%j

@ -77,24 +77,24 @@ done
#get javastart args #get javastart args
java_args="" java_args=""
if [ -f DATA/SETTINGS/httpProxy.conf ] if [ -f DATA/SETTINGS/yacy.conf ]
then then
# startup memory # startup memory
for i in Xmx Xms; do for i in Xmx Xms; do
j="`grep javastart_$i DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`"; j="`grep javastart_$i DATA/SETTINGS/yacy.conf | sed 's/^[^=]*=//'`";
if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi; if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi;
done done
# Priority # Priority
j="`grep javastart_priority DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`"; j="`grep javastart_priority DATA/SETTINGS/yacy.conf | sed 's/^[^=]*=//'`";
if [ ! -z "$j" ];then if [ ! -z "$j" ];then
if [ -n $j ]; then JAVA="nice -n $j $JAVA"; fi; if [ -n $j ]; then JAVA="nice -n $j $JAVA"; fi;
fi fi
PORT="`grep ^port= DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`"; PORT="`grep ^port= DATA/SETTINGS/yacy.conf | sed 's/^[^=]*=//'`";
# for i in `grep javastart DATA/SETTINGS/httpProxy.conf`;do # for i in `grep javastart DATA/SETTINGS/yacy.conf`;do
# i="${i#javastart_*=}"; # i="${i#javastart_*=}";
# JAVA_ARGS="-$i $JAVA_ARGS"; # JAVA_ARGS="-$i $JAVA_ARGS";
# done # done
@ -102,6 +102,25 @@ else
JAVA_ARGS="-Xmx120m -Xms120m $JAVA_ARGS"; JAVA_ARGS="-Xmx120m -Xms120m $JAVA_ARGS";
PORT="8080" PORT="8080"
fi fi
if [ -f DATA/SETTINGS/httpProx.conf ]
then
# startup memory
for i in Xmx Xms; do
j="`grep javastart_$i DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`";
if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi;
done
# Priority
j="`grep javastart_priority DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`";
if [ ! -z "$j" ];then
if [ -n $j ]; then JAVA="nice -n $j $JAVA"; fi;
fi
PORT="`grep ^port= DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'`";
fi
#echo "JAVA_ARGS: $JAVA_ARGS" #echo "JAVA_ARGS: $JAVA_ARGS"
#echo "JAVA: $JAVA" #echo "JAVA: $JAVA"

@ -14,7 +14,7 @@ set jms=
set javacmd=-Xmx64m -Xms10m set javacmd=-Xmx64m -Xms10m
set priolvl=0 set priolvl=0
set priority=/NORMAL set priority=/NORMAL
if exist DATA\SETTINGS\httpProxy.conf GoTo :GETSTARTOPTS if exist DATA\SETTINGS\yacy.conf GoTo :GETSTARTOPTS
:STARTJAVA :STARTJAVA
Rem Starting YaCy Rem Starting YaCy
@ -28,7 +28,7 @@ GoTo :END
Rem This target is used to read java runtime parameters out of the yacy config file Rem This target is used to read java runtime parameters out of the yacy config file
:GETSTARTOPTS :GETSTARTOPTS
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do ( for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\yacy.conf) do (
if "%%i"=="javastart_Xmx" set jmx=%%j if "%%i"=="javastart_Xmx" set jmx=%%j
if "%%i"=="javastart_Xms" set jms=%%j if "%%i"=="javastart_Xms" set jms=%%j
if "%%i"=="javastart_priority" set priolvl=%%j if "%%i"=="javastart_priority" set priolvl=%%j

@ -3,8 +3,8 @@ cd `dirname $0`
if [ -x `which wget` ] if [ -x `which wget` ]
then then
port=`cat DATA/SETTINGS/httpProxy.conf |grep "^port="|sed "s/.*=//"` port=`cat DATA/SETTINGS/yacy.conf |grep "^port="|sed "s/.*=//"`
pw=`cat DATA/SETTINGS/httpProxy.conf |grep "^adminAccountBase64MD5="|sed "s/.*=//"` pw=`cat DATA/SETTINGS/yacy.conf |grep "^adminAccountBase64MD5="|sed "s/.*=//"`
wget -q -t 1 --timeout=5 --header "Authorization: realm=$pw" http://localhost:$port/Steering.html?shutdown=true -O /dev/null wget -q -t 1 --timeout=5 --header "Authorization: realm=$pw" http://localhost:$port/Steering.html?shutdown=true -O /dev/null
echo "Please wait until the YaCy daemon process terminates" echo "Please wait until the YaCy daemon process terminates"
@ -23,7 +23,7 @@ then
echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'" echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'"
else else
port=`cat DATA/SETTINGS/httpProxy.conf |grep "^port="|sed "s/.*=//"` port=`cat DATA/SETTINGS/yacy.conf |grep "^port="|sed "s/.*=//"`
echo "Neither wget nor java could be found or are not executable." echo "Neither wget nor java could be found or are not executable."
echo "Visit http://localhost:$port/Steering.html?shutdown=true to stop YaCy or (in emergency case) use ./killYACY.sh" echo "Visit http://localhost:$port/Steering.html?shutdown=true to stop YaCy or (in emergency case) use ./killYACY.sh"
fi fi

@ -83,10 +83,9 @@ install -d ${RPM_BUILD_ROOT}{$YACYCDIR,$YACYDDIR,$YACYLDIR/libx,$DATADIR,$LOGDIR
# copy all other files # copy all other files
cp -r htroot locales ranking skins ${RPM_BUILD_ROOT}$YACYCDIR/ cp -r htroot locales ranking skins ${RPM_BUILD_ROOT}$YACYCDIR/
cp -r classes lib libx ${RPM_BUILD_ROOT}$YACYLDIR/ cp -r defaults classes lib libx ${RPM_BUILD_ROOT}$YACYLDIR/
cp -r doc ${RPM_BUILD_ROOT}$YACYDDIR/ cp -r doc ${RPM_BUILD_ROOT}$YACYDDIR/
cp *.sh build.properties superseed.txt httpd.mime yacy.badwords.example yacy.logging yacy.stopwords* yacy.yellow ${RPM_BUILD_ROOT}$YACYCDIR/
cp *.sh build.properties superseed.txt httpd.mime yacy.badwords.example yacy.init yacy.logging yacy.stopwords* yacy.yellow ${RPM_BUILD_ROOT}$YACYCDIR/
cp AUTHORS COPYRIGHT ChangeLog gpl.txt readme.txt ${RPM_BUILD_ROOT}$YACYDDIR/ cp AUTHORS COPYRIGHT ChangeLog gpl.txt readme.txt ${RPM_BUILD_ROOT}$YACYDDIR/
install -m 744 *.sh ${RPM_BUILD_ROOT}$YACYCDIR/ # start/stop/kill scripts install -m 744 *.sh ${RPM_BUILD_ROOT}$YACYCDIR/ # start/stop/kill scripts
@ -129,8 +128,8 @@ chmod +x /usr/share/yacy/killYACY.sh
#if [ $LNT == de -o $LNT == it -o $LNT == sk ]; then # translation exists #if [ $LNT == de -o $LNT == it -o $LNT == sk ]; then # translation exists
# # test whether settings-directory exists # # test whether settings-directory exists
# if [ ! -d /var/lib/yacy/SETTINGS ]; then mkdir /var/lib/yacy/SETTINGS; chown yacy:root /var/lib/yacy/SETTINGS; fi # if [ ! -d /var/lib/yacy/SETTINGS ]; then mkdir /var/lib/yacy/SETTINGS; chown yacy:root /var/lib/yacy/SETTINGS; fi
# echo "htLocaleSelection=$LNT.lng" >> /var/lib/yacy/SETTINGS/httpProxy.conf # echo "htLocaleSelection=$LNT.lng" >> /var/lib/yacy/SETTINGS/yacy.conf
# chown yacy:root /var/lib/yacy/SETTINGS/httpProxy.conf # chown yacy:root /var/lib/yacy/SETTINGS/yacy.conf
#fi #fi
@ -153,7 +152,7 @@ cat > /etc/init.d/yacy <<EOF
# Default-Start: 3 5 # Default-Start: 3 5
# Default-Stop: # Default-Stop:
# Description: yacy is a distributed search engine # Description: yacy is a distributed search engine
# config-file is /etc/yacy/httpProxy.conf # config-file is /etc/yacy/yacy.conf
### END INIT INFO ### END INIT INFO
YACY_HOME="/usr/share/yacy" YACY_HOME="/usr/share/yacy"
@ -171,10 +170,10 @@ if [ ! -x "\$JAVA" ]; then
fi fi
# get arguments for java # get arguments for java
if [ -f \$DATA_HOME/SETTINGS/httpProxy.conf ]; then if [ -f \$DATA_HOME/SETTINGS/yacy.conf ]; then
i=\`grep javastart_Xmx \$DATA_HOME/SETTINGS/httpProxy.conf\`; i=\`grep javastart_Xmx \$DATA_HOME/SETTINGS/yacy.conf\`;
JAVA_MAX="-\${i#javastart_Xmx=}"; JAVA_MAX="-\${i#javastart_Xmx=}";
i=\`grep javastart_Xms \$DATA_HOME/SETTINGS/httpProxy.conf\`; i=\`grep javastart_Xms \$DATA_HOME/SETTINGS/yacy.conf\`;
JAVA_MIN="-\${i#javastart_Xms=}"; JAVA_MIN="-\${i#javastart_Xms=}";
fi fi

@ -37,12 +37,15 @@ Section "Binaries (required)"
File "stopYACY.bat" File "stopYACY.bat"
File "stopYACY_Win9x.bat" File "stopYACY_Win9x.bat"
#File "httpProxy.command" ##Apple #File "httpProxy.command" ##Apple
File "yacy.init"
#File "httpProxy.sh" ##UNIX #File "httpProxy.sh" ##UNIX
File "yacy.yellow" File "yacy.yellow"
File "yacy.stopwords" File "yacy.stopwords"
File "yacy.badwords.example" File "yacy.badwords.example"
#defaults
SetOutPath "$INSTDIR\defaults"
File /r "defaults\*"
#texts #texts
File "readme.txt" File "readme.txt"
File "gpl.txt" File "gpl.txt"

Loading…
Cancel
Save