Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Remove grouping separator in Network.xml (yacystats will woork without it) and format a few more numbers.
fuchsi3352474dd880
diff --git a/htroot/Network.java b/htroot/Network.javaindex 786e6097c..36f76cc00 100644--- a/htroot/Network.java+++ b/htroot/Network.java@@ -175,16 +175,16 @@ public class Network {// overall results: Network statisticsif (iAmActive) conCount++; else if (mySeedType.equals(yacySeed.PEERTYPE_JUNIOR)) potCount++;- prop.put("table_active-count", conCount);+ prop.put("table_active-count", yFormatter.number(conCount));prop.put("table_active-links", yFormatter.number(accActLinks));prop.put("table_active-words", yFormatter.number(accActWords));- prop.put("table_passive-count", disconCount);+ prop.put("table_passive-count", yFormatter.number(disconCount));prop.put("table_passive-links", yFormatter.number(accPassLinks));prop.put("table_passive-words", yFormatter.number(accPassWords));- prop.put("table_potential-count", potCount);+ prop.put("table_potential-count", yFormatter.number(potCount));prop.put("table_potential-links", yFormatter.number(accPotLinks));prop.put("table_potential-words", yFormatter.number(accPotWords));- prop.put("table_all-count", (conCount + disconCount + potCount));+ prop.put("table_all-count", yFormatter.number(conCount + disconCount + potCount));prop.put("table_all-links", yFormatter.number(accActLinks + accPassLinks + accPotLinks));prop.put("table_all-words", yFormatter.number(accActWords + accPassWords + accPotWords));diff --git a/htroot/Status.java b/htroot/Status.javaindex 975aeda4e..dd9570ff5 100644--- a/htroot/Status.java+++ b/htroot/Status.java@@ -341,16 +341,16 @@ public class Status {prop.put("loaderQueueMax", Integer.toString(loaderMaxCount));prop.put("loaderQueuePercent", (loaderPercent>100)?"100":Integer.toString(loaderPercent));- prop.put("localCrawlQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL).getJobCount()));+ prop.put("localCrawlQueueSize", yFormatter.number(sb.getThread(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL).getJobCount()));prop.put("localCrawlPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL)?1:0);- prop.put("remoteTriggeredCrawlQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount()));+ prop.put("remoteTriggeredCrawlQueueSize", yFormatter.number(sb.getThread(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount()));prop.put("remoteTriggeredCrawlPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL)?1:0);- prop.put("globalCrawlTriggerQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER).getJobCount()));+ prop.put("globalCrawlTriggerQueueSize", yFormatter.number(sb.getThread(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER).getJobCount()));prop.put("globalCrawlTriggerPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER)?1:0);- prop.put("stackCrawlQueueSize", Integer.toString(sb.sbStackCrawlThread.size()));+ prop.put("stackCrawlQueueSize", yFormatter.number(sb.sbStackCrawlThread.size()));// return rewrite propertiesprop.put("date",(new Date()).toString());diff --git a/source/de/anomic/tools/yFormatter.java b/source/de/anomic/tools/yFormatter.javaindex 3ef84b9b1..96e5cd314 100644--- a/source/de/anomic/tools/yFormatter.java+++ b/source/de/anomic/tools/yFormatter.java@@ -70,12 +70,9 @@ public final class yFormatter {public static void setLocale(String lang) {String l = (lang.equalsIgnoreCase("default") ? "en" : lang.toLowerCase());if (l.equals("none")) {- // TODO fix the following without breaking yacystats and similar.- // special format for backwards compatibility in .xml files- // #.###.## (dots for grouping + decimal separator)DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.ENGLISH);- dfs.setGroupingSeparator('.');- numForm = new DecimalFormat("#,###.##", dfs);+ dfs.setGroupingSeparator('.'); // not used+ numForm = new DecimalFormat("####.##", dfs);} else {setLocale(new Locale(l));initDefaults();