Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- fix for bad reset of index / bad index location after deletion - some modification of rssTerminal window location and size

orbitere91bf4c8cccf
diff --git a/htroot/Status.html b/htroot/Status.html
index d8da33c67..da128da09 100644
--- a/htroot/Status.html
+++ b/htroot/Status.html
@@ -36,9 +36,9 @@
<div class="welcome">
<center>
- <h2>Welcome to YaCy!</h2><br />
- <iframe src="rssTerminal.html?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING,INDEXRECEIVE&width=468px&height=200px&maxlines=18&maxwidth=95"
- width="482" height="220" scrolling="no" name="newsframe"
+ <h2>Welcome to YaCy!</h2>
+ <iframe src="rssTerminal.html?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING,INDEXRECEIVE&width=468px&height=200px&maxlines=17&maxwidth=95"
+ width="468" height="200" scrolling="no" name="newsframe"
marginheight="0" marginwidth="0" frameborder="0"></iframe><br />
<img src="Banner.png?textcolor=000000&amp;bgcolor=ddeeee&amp;bordercolor=aaaaaa" alt="banner" />
</center>
diff --git a/htroot/terminal_p.html b/htroot/terminal_p.html
index 7c0fa3608..44495a484 100755
--- a/htroot/terminal_p.html
+++ b/htroot/terminal_p.html
@@ -42,7 +42,7 @@ function init() {
<a href="/index.html">&lt;Search Form&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/CrawlStartExpert_p.html">&lt;Crawl Start&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/Status.html">&lt;Status Page&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="/Steering.html?shutdown=" onclick="return confirm('Confirm Shutdown')>&lt;Shutdown&gt;</a>
+<a href="/Steering.html?shutdown=" onclick="return confirm('Confirm Shutdown')">&lt;Shutdown&gt;</a>
</div>
<div class="bars"></div>
@@ -52,8 +52,8 @@ function init() {
<div class="navouter">
<div class="navheader">Event Terminal</div>
<div class="navcontent">
-<iframe src="/rssTerminal.html?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING,INDEXRECEIVE&width=430px&height=200px&maxlines=24&maxwidth=95&color=fff&background=000"
- width="430" height="220" scrolling="no" name="newsframe"
+<iframe src="/rssTerminal.html?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING,INDEXRECEIVE&width=430px&height=200px&maxlines=22&maxwidth=95&color=fff&background=000"
+ width="430" height="200" scrolling="no" name="newsframe"
marginheight="0" marginwidth="0" frameborder="0">
</iframe>
</div>
diff --git a/source/de/anomic/kelondro/kelondroAbstractRA.java b/source/de/anomic/kelondro/kelondroAbstractRA.java
index 1bea5439f..7c92f857a 100644
--- a/source/de/anomic/kelondro/kelondroAbstractRA.java
+++ b/source/de/anomic/kelondro/kelondroAbstractRA.java
@@ -47,6 +47,7 @@ package de.anomic.kelondro;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
@@ -59,9 +60,13 @@ abstract class kelondroAbstractRA implements kelondroRA {
// logging support
protected String name = null;
+ protected File file = null;
public String name() {
return name;
}
+ public File file() {
+ return file;
+ }
// pseudo-native methods:
abstract public long length() throws IOException;
diff --git a/source/de/anomic/kelondro/kelondroAbstractRecords.java b/source/de/anomic/kelondro/kelondroAbstractRecords.java
index 3a4c75209..b329409e1 100644
--- a/source/de/anomic/kelondro/kelondroAbstractRecords.java
+++ b/source/de/anomic/kelondro/kelondroAbstractRecords.java
@@ -405,7 +405,8 @@ public abstract class kelondroAbstractRecords implements kelondroRecords {
public void clear() throws IOException {
kelondroRA ra = this.entryFile.getRA();
- File f = new File(ra.name());
+ File f = ra.file();
+ assert f != null;
this.entryFile.close();
f.delete();
ra = new kelondroFileRA(f);
diff --git a/source/de/anomic/kelondro/kelondroCachedRA.java b/source/de/anomic/kelondro/kelondroCachedRA.java
index 1cd2a80c6..9b27d8e6f 100644
--- a/source/de/anomic/kelondro/kelondroCachedRA.java
+++ b/source/de/anomic/kelondro/kelondroCachedRA.java
@@ -58,6 +58,7 @@ public class kelondroCachedRA extends kelondroAbstractRA implements kelondroRA {
public kelondroCachedRA(kelondroRA ra, int cachesize, int elementsize) {
this.ra = ra;
this.name = ra.name();
+ this.file = ra.file();
this.cacheMemory = new HashMap<Integer, byte[]>();
this.cacheScore = new kelondroMScoreCluster<Integer>();
this.cacheElementSize = elementsize;
diff --git a/source/de/anomic/kelondro/kelondroFileRA.java b/source/de/anomic/kelondro/kelondroFileRA.java
index 98c4e4722..a543185fe 100644
--- a/source/de/anomic/kelondro/kelondroFileRA.java
+++ b/source/de/anomic/kelondro/kelondroFileRA.java
@@ -57,6 +57,7 @@ public final class kelondroFileRA extends kelondroAbstractRA implements kelondro
public kelondroFileRA(File file) throws IOException, FileNotFoundException {
this.name = file.getName();
+ this.file = file;
RAFile = new RandomAccessFile(file, "rw");
}
diff --git a/source/de/anomic/kelondro/kelondroNIOFileRA.java b/source/de/anomic/kelondro/kelondroNIOFileRA.java
index ee51d6b6e..e3defea9c 100644
--- a/source/de/anomic/kelondro/kelondroNIOFileRA.java
+++ b/source/de/anomic/kelondro/kelondroNIOFileRA.java
@@ -65,6 +65,7 @@ public class kelondroNIOFileRA extends kelondroAbstractRA implements kelondroRA
public kelondroNIOFileRA(File file, boolean mapBody, long tailMaxSize) throws IOException {
this.name = file.getName();
+ this.file = file;
this.seekPos = 0;
this.bodyOffset = headSize;
if (bodyOffset >= file.length()) {
diff --git a/source/de/anomic/kelondro/kelondroRA.java b/source/de/anomic/kelondro/kelondroRA.java
index 3b045220b..d8788ed63 100644
--- a/source/de/anomic/kelondro/kelondroRA.java
+++ b/source/de/anomic/kelondro/kelondroRA.java
@@ -50,6 +50,7 @@
package de.anomic.kelondro;
+import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -58,6 +59,7 @@ public interface kelondroRA {
// logging support
public String name();
+ public File file();
// pseudo-native methods:
public long length() throws IOException;