accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: init method being called multiple times of WrappingIterator.
Date Thu, 26 Mar 2015 14:10:58 GMT
Hi Shweta,

Iterators are not singletons, so yes, it is expected that there are 
multiple instances of an iterator in TabletServer memory. The number of 
instances will be loosely relative to the numbers of scans (and 
compactions).

As for the lifecycle, I recently added new documentation that covers 
this in ACCUMULO-3633. A copy of the PDF user manual is attached there

https://issues.apache.org/jira/secure/attachment/12705270/Apache%20Accumulo%20User%20Manual%20Version%201.7.pdf

See chapter 7 and let us know if there is still anything that is unclear 
as this chapter was meant specifically to answer the questions you 
posed. Thanks!

- Josh

shweta.agrawal wrote:
> HI,
>
>
> I have made an Iterator by extending WrappingIterator. I build it's jar
> and uploaded it in accumulo cluster. But when using this itertor in my
> program, I noticed that it's taking too much time. I did a file writing
> in init method of iterator I actually wrote the object which is calling
> this init method. when i opened file, there were approx 150 objecs of my
> itertaor. Means init method of Iterator is being called 150 times by
> different objects of iterator.
>
> Is it normal ? or am I doing something wrong ?
>
> can you tell me the life cycle of Iterator. Actually it's not quite
> clear in documentation . I have some questions like Who makes it's
> object? How many objects are made ? how many times a init method is
> called ? If there is any destroy like method in WrappingIterator for
> closing connections.
>
> Thank you,
>
> Shweta Agrawal

Mime
View raw message