([email protected], cc'ed to Steve)

Ian,

TDB does not support any kind of Iterator.remove. It's rather messy and in some cases not possible (delete from dynamic union) which would have to be special cased. i.e. adding ideal streaming support is quite a lot of work.

For renameResource, would it be reasonable to switch to a design which is "gather a chunlk of things to be deleted, delete them, insert new stuff" so that iterator.remove isn't needed?

The TDB bulk handler for delete does this is chunks of a few 1000 items to avoid the iterator.remove problem but that is easy by the nature of the deletion. This would work for ResourceUtils.renameResource because it's similarly idempotent and chunkable.

But if it is really necessary for a streaming based rename, then TDB could be changed at the expense of a lot of work and development latency - there are a lot of iterators to check.

Are there any other operations that do iterator.remove style processing I need to check?

Versions:
Jena 2.6.4
TDB 0.8.10

I also tried Jena 2.6.5-SNAPSHOT as of June 6, 2011, for kicks. The stacktrace 
is slightly different, due to a rewrite of RenameResource, but the result is 
the same UnsupportedOperationException.

If it's helpful, I can pack up a unit test to demonstrate that renameResource 
fails for a TDB-backed model, but works fine on a model created by 
ModelFactory.createDefaultModel().

TDB has a in-memory mode - really useful for testing.

        Andy

Reply via email to