- fix for bad reset of index / bad index location after deletion

- some modification of rssTerminal window location and size

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4850 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2008-05-24 21:30:22 +00:00
parent f284386b63
commit e91bf4c8cc
8 changed files with 18 additions and 7 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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");
}

View File

@ -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()) {

View File

@ -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;