Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Accumulo >> mail # dev >> Resource leak warnings


+
Christopher 2013-12-13, 20:44
+
William Slacum 2013-12-13, 20:54
+
Sean Busbey 2013-12-13, 20:55
+
Christopher 2013-12-13, 21:26
+
Sean Busbey 2013-12-13, 21:34
+
Christopher 2013-12-14, 00:03
+
Mike Drob 2013-12-20, 04:43
+
Christopher 2013-12-21, 22:47
+
Bill Havanki 2013-12-22, 19:23
+
Christopher 2013-12-23, 03:28
+
Keith Turner 2013-12-23, 17:17
+
Mike Drob 2013-12-23, 21:36
+
Christopher 2013-12-23, 23:06
+
Keith Turner 2013-12-23, 23:37
+
Mike Drob 2013-12-26, 18:26
+
Sean Busbey 2013-12-26, 19:48
+
William Slacum 2013-12-27, 19:23
Copy link to this message
-
Re: Resource leak warnings
The javadoc for Instance says: "This class represents the information
a client needs to know to connect to an instance of accumulo."

There's no mention of connection resources or shared state, or any
indication that it is used for anything other than a one-time method
to get a connection... it seems to be defined as configuration
information. The fact that we're talking about it representing
connection resources (which aren't even stored in ZooKeeperInstance
itself, but happens to use some of the shared state we're talking
about for its own implementation), is a bit confusing in the context
of the declared semantics from the javadoc.

The fact is, we store state statically, as global resources, in the
JVM, and (I think) changing the definition of Instance to represent
this statically stored state, is very confusing. I think a static
utility makes a lot more sense to clean up static shared state hidden
deep in the implementation... until we can invent (in a new API) an
actual ConnectionResources object to represent connection resources,
with a well-defined lifetime (not "for the duration of the JVM's
lifetime", as it currently is defined in released versions) where the
cleanup of these resources makes sense.

--
Christopher L Tubbs II
http://gravatar.com/ctubbsii
On Fri, Dec 27, 2013 at 2:23 PM, William Slacum
<[EMAIL PROTECTED]> wrote:
> We need to actually define the usage pattern and lifetime of a
> ZooKeeperInstance. Looking at the code, it's really masking a singleton
> usage pattern. The resources backing a given set of zookeepers+timeout pair
> all share a ZooCache, and we hand-rolled reference counting for
> ZooKeeperInstances themselves. That indicates that a ZooKeeperInstance is
> basically a global variable, and we have to be careful about the resources
> it allocates, directly or indirectly, because their lifetimes are opaque
> from the perspective of the client.
>
> I'm a fan of the close method, because it puts, in code, how an instance
> tidies up after itself. We didn't have any cleanup before because the
> ZooCache for a given zookeeper+timeout lived on until the process died.
> Since the side effects of our API aren't documented or made clear to the
> client, it's on us to handle and manage them. Making it optional for a user
> is a benefit, because maybe they don't care and someone else (gc, another
> management thread) will call close() on the instance, or maybe they want to
> force a close at class unloading.
>
> The utility seems to be brute forcing shutdown- is it possible to get
> something finer grained for specific instances? Shutting down every thing
> will handle the "clean up at unload" time issue, but not necessarily
> anything involving closing down a subset of ZooSessions.
>
>
>
> On Thu, Dec 26, 2013 at 2:48 PM, Sean Busbey <[EMAIL PROTECTED]>wrote:
>
>> On Dec 26, 2013 12:27 PM, "Mike Drob" <[EMAIL PROTECTED]> wrote:
>> >
>> > I'm willing to stipulate that this solves the thread leak from web
>> > containers - I haven't verified it, but I am ever hopeful. Does this
>> > solution imply that we should nix the close() methods just added in the
>> > snapshot branches?
>> >
>> >
>>
>> If we can verify that it solves the leaks for web containers, I would say
>> yes.
>>
>> We can do proper life cycle for persistent state when we provide an updated
>> client API.
>>
+
William Slacum 2013-12-30, 14:36
+
Josh Elser 2013-12-30, 14:57
+
Sean Busbey 2013-12-30, 15:05
+
Josh Elser 2013-12-30, 16:01
+
Sean Busbey 2013-12-30, 16:16
+
Josh Elser 2013-12-30, 16:49
+
Bill Havanki 2013-12-30, 17:52
+
Jared Winick 2013-12-31, 20:03
+
Jared Winick 2013-12-24, 14:47
+
William Slacum 2013-12-23, 08:34
+
Bill Havanki 2013-12-23, 14:54
+
Mike Drob 2013-12-13, 21:02
+
Christopher 2013-12-13, 21:34
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB