Finally I fixed that:
Threads populate simple vector within a transactions and I do finally
(after pmap) loading vector content into the final model.
That was easy because I do not need to do any hi level operations on the
data.
Also I noticed the final fingerprint is much smaller than in case of rdf4j
Models juggling.

Regards,
Jacek

On 1 December 2017 at 12:18, Jacek Grzebyta <grzebyta....@gmail.com> wrote:

> Hi,
>
> I need to load a Java data-base presented as java Collection. Basically it
> is org.eclipse.rdf4j.sail.model.SailModel   (http://docs.rdf4j.org/
> javadoc/latest/org/eclipse/rdf4j/sail/model/SailModel.html). Anyway the
> data are stored on the disk but the object is not thread safe.
>
> In my program I creates threads which populate the model asynchronously.
> each thread (pmap) follows pattern:
>
> in the main defn
>
> f-model ...... ;; final target
>
>
> (defn [args ]
> (let [tmp-model1 ...
>         tmp-model2  .....
>         .....]
> (locking f-model
>     (.addAll f-model tmp-model1)
>     ...
> )))
>
> But I do not think it is a good solution - I found my program stop working
> shortly after building up the final model.
> In my previous version threads return single tmp-models but that caused
> out of memory easy. What else can I try?
>
> Regads,
> Jacek
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to