Reader and Writer at the same DB

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Reader and Writer at the same DB

Jakob Heidebrecht
Hi,
Can I open a writer and reader to one db at the same time?
 
I open an NFS on the DB.
To this NFS I open a writer and a reader.
When I delete something from the db and close the writer, the changes are
writen to the db, but I get a error when I then try to close the reader:

Exception in thread "main" java.io.IOException: Given target not held as
lock
at org.apache.nutch.fs.LocalFileSystem.release(LocalFileSystem.java:239)
at org.apache.nutch.db.WebDBReader.close(WebDBReader.java:121)
at org.apache.nutch.tools.WebDBAdminTool.main(WebDBAdminTool.java:246)

When I make a NFS-object and a File-object for the writer and an other NFS
and File-object for the reader, I get the same error.

Can I avoid this, or is it ok to close only the writer and not to close the
reader?

Regards,

Jakob Heidebrecht

--
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl