You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Frédéric Esnault <fe...@legisway.com> on 2007/06/14 17:14:21 UTC

Import progress

Hi there,

 

I was wondering...I'm currently importing 18,000 contents (I generated them, exported them, cleaned the repository then I reimport).

My question is : Is there a way to have a kind of tracker/listener to know the import process progress.

 

Basically, the import is running for 22 minutes, I don't know how long it will take. For me it's not a problem, but I'm thinking about customer who'd like to have a percentage of the import shown during the import process.

 

Is it possible?

 

Frederic Esnault


Re: Import progress

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 6/14/07, Frédéric Esnault <fe...@legisway.com> wrote:
> I was wondering...I'm currently importing 18,000 contents (I generated them,
> exported them, cleaned the repository then I reimport).
>
> My question is : Is there a way to have a kind of tracker/listener to know
> the import process progress.

One solution would be to decorate the import ContentHandler to for
example keep track of the number of startElement calls. You could use
that information to update a progress bar. The problem with this
approach is that in Jackrabbit a lot of the work happens only as a
last step after the entire XML stream has been imported.

A common approach I've used in many large imports is to split them
into smaller subsets, which both avoids excessive memory requirements
and gives a nice way to show progress while the import is happening.

BR,

Jukka Zitting