Christine, I took another look at this and tested the code. You are right,
the listener's batchProcessComplete() is not called no matter what the
batchSize is set to.

I think the real intent for the <Checkpoint...> element within
<CpeConfig...> is to define a checkpoint file and frequency of checkpoints.
The CPE saves its
progress i(stats) in the file for possible recovery from a failure. There
is a brief description of this in UIMA reference guide at the bottom of
section 3.7:

http://uima.apache.org/d/uimaj-2.3.1/references.html#ugr.ref.xml.cpe_descriptor.descriptor.operational_parameters


Since your listener entityProcessComplete() is called you can manage
batching yourself. This method is guaranteed to be called by the CPM.

The real intent behind the batchProcessCompleteI() is to improve
performance of CasProcessor(s), especially a CasConsumer. You can set up
<Checkpoint ...>
element for each CasProcessor in the Cpe descriptor and define batchSize.
The CPM will (and it does) call batchProcessComplete in this case. I ran a
quick test
to make sure and can say that it does work.

Perhaps we need to document this better to make it clearer but at this
point I think the CPM is working as designed. Feel free to disagree. :)

Jerry


On Thu, Aug 2, 2012 at 3:20 AM, Christine Engelmann
<chr.engelm...@gmx.net>wrote:

> Hi,
>
> thank you. I have already tried setting the batch attribute of the
> <checkpoint> element, though, and the method is still not called. That's
> why I'm unsure as to how this function is actually triggered.
>
> Christine
>
>
> On Wed, 1 Aug, 2012 at 4:58 PM, Jaroslow Cwiklik <uim...@gmail.com> wrote:
>
> > If I recall, you need to modify <checkpoint> element and set "batch"
> > attribute to enable this
> > function. I think, by default this method is not called since batch=0
> > (default).
> >
> > JC
> >
> > On Tue, Jul 31, 2012 at 3:22 PM, Christine Engelmann
> > <chr.engelm...@gmx.net>wrote:
> >
> > > Hi,
> > >
> > > I seem to have some issues with the batchProcessComplete()-method in
> the
> > > StatusCallBackListener of which I'm using an implementation in
> > conjunction
> > > with a cpe. How and where do I set the corresponding batch size? Is
> this
> > > done in the chekpoint element of the cpe configuration or somewhere
> > else?
> > > It seems to me that this method is never called by the system (as
> > opposed
> > > to e.g. collectionProcessComplete()).
> > >
> > > Regards,
> > > Christine
> > >
>

Reply via email to