Hi:

it seems you are writing to a xml file with multiple threads. I guess it can
be done by using BlockingQueue in java 1.5 concurrency api. you just add any
url entry into the queue from multiple producer threads, and use a separate
consumer thread to retrive url entries from the queue and write to a single
file in append mode. I see that Fetcher use multiple FetcherThread to fetch
pages so I guess this trick would work.

good luck

yanky


2009/3/16 MyD <myd.ro...@googlemail.com>

>
> hi @ all,
>
> is there a class which allows writing information to a file and is also
> synchronized?
>
> I'd like to write a xml file which input comes from my custom html filter.
> The xml file contains entries from each fetched/parsed url and has to be
> synchronized and at the end it should be 1 xml file. Thanks in advance.
>
> Regards,
> MyD
> --
> View this message in context:
> http://www.nabble.com/synchronized-File-Writer-tp22531603p22531603.html
> Sent from the Nutch - User mailing list archive at Nabble.com.
>
>

Reply via email to