lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Kunemann" <frank.kunem...@innosystec.de>
Subject NativeFSLockFactory problem
Date Thu, 19 Oct 2006 06:53:50 GMT
 
Hi all,

I'm trying to use the new class NativeFSLockFactory, but as you can guess I
have a problem using it.
Don't know what I'm doing wrong, so here is the code:


FSDirectory dir = FSDirectory.getDirectory(indexDir, create,
NativeFSLockFactory.getLockFactory());
logger.info("Index: "+indexDir.getAbsolutePath()+" Lock file:
"+dir.getLockID());
this.writer = new IndexWriter(dir, new StandardAnalyzer(), create);


Just to explain: indexDir is a file, create is set to false. 2nd line is to
see what is going on.


My problem is that there are many indices, for testing purpose just 4 of
them. The first one is started and working like it should, but from the 2nd
on I get those "Lock obtain timed out"- exceptions.
This is the log output:

08:38:05,199 INFO  [IndexerManager] No indexer found for directory
D:\[mydir]\index1- starting new one!
08:38:05,199 INFO  [Indexer] Index: D:\[mydir]\index1 Lock file:
lucene-0ca7838f9396a636d1feda5aabb9b8db
08:38:05,215 INFO  [IndexerManager] New amount of Indexers: 1
08:38:05,215 INFO  [IndexerManager] No indexer found for directory
D:\[mydir]\index2- starting new one!
08:38:05,215 INFO  [Indexer] Index: D:\[mydir]\index2 Lock file:
lucene-cc9dfaabbf7ad61c4bb3af007b88288c
08:38:06,213 ERROR [IndexerManager] Lock obtain timed out:
NativeFSLock@C:\Dokumente und Einstellungen\[user]\Lokale
Einstellungen\Temp\lucene-fd415060ae453638d69faa9fa07fbe95-n-write.lock
java.io.IOException: Lock obtain timed out: NativeFSLock@C:\Dokumente und
Einstellungen\[user]\Lokale
Einstellungen\Temp\lucene-fd415060ae453638d69faa9fa07fbe95-n-write.lock
	at org.apache.lucene.store.Lock.obtain(Lock.java:68)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:257)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:247)
	at de.innosystec.iar.indexing.Indexer.setUp(Indexer.java:101)
	at de.innosystec.iar.indexing.Indexer.<init>(Indexer.java:80)
	at
de.innosystec.iar.indexing.IndexerManager.addDocumentElement(IndexerManager.
java:228)
	at
de.innosystec.iar.parsing.ParserManager.indexDocumentElement(ParserManager.j
ava:286)
	at
de.innosystec.iar.parsing.ParserThread.startWorking(ParserThread.java:378)
	at de.innosystec.iar.parsing.ParserThread.run(ParserThread.java:175)
	at java.lang.Thread.run(Unknown Source)


The lock file mentioned in the exception is really created and used by the
first index. Seems like the FSDirectory.getLockID method doesn't work for
NativeFSLockFactory?
I'm using Win XP on my test platform.


Regards,
Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message