jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: BTreeManager - opt in or automatic?
Date Mon, 07 May 2012 21:16:59 GMT

On 7.5.12 20:03, David Hausladen wrote:
> Hi,
> I have some questions about BTreeManager and how it is used to solve the problem of large
sets of child nodes. We're converting a legacy document store into Jackrabbit, preserving
file paths. Unfortunately, we found that this legacy store was very flat in some cases and
when that is the case, performance suffers, in some cases dramatically. A few searches turned
up BTreeManager. But there's very little documentation of how to use it.
> 1.) First of all, is it automatically used by Jackrabbit to manage the children of all
nodes, or is it an opt-in feature?

It is an opt-in feature. Jackrabbit only uses it in the UserManager 
implementation for managing groups with many members.

> 2.) If it is an opt-in feature, does one need to always use ItemSequence to access the
children of a node?  Based on what I see of the code, it seems necessary since without the
mapping performed by ItemSequence, the backing nodes' getNodes methods would return the internal
(hierarchical) rather than the flat structure.

Basically yes. TreeManager instances are responsible for mapping 
sequential structures to tree structures. The BTreeManager uses a BTree 
for that. NodeSequence and PropertySequence provide means for accessing 
nodes in such trees as though they are a sequential structures. If you 
access the underlying tree directly, you will see the internal BTree 


> Thanks,
> Dave

View raw message