You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2017/09/25 06:05:25 UTC

Access to NodeStore instance within benchmark

For a new benchmark I need access to NodeStore associated with current
Oak instance to configure a cleaner instance [1].

Any idea on how can it be done? So far not able to find a way to
access the NodeStore instance in the benchmark [2].

One way can be to expose NodeStore instance from the Oak class. Would
that be ok to do?

Chetan Mehrotra
[1] https://github.com/chetanmeh/jackrabbit-oak/blob/OAK-6535/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/property/PropertyIndexCleaner.java#L64

[2] https://github.com/chetanmeh/jackrabbit-oak/blob/OAK-6535/oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/HybridIndexTest.java#L151

Re: Access to NodeStore instance within benchmark

Posted by Chetan Mehrotra <ch...@gmail.com>.
Its bit buried in layers. I saw few other benchmark use reflection to
access the NodeStore. So for now using that to move forward


Chetan Mehrotra


On Tue, Sep 26, 2017 at 3:32 PM, Michael Dürig <md...@apache.org> wrote:
>
> I tend to agree with Davide. Especially since the use case is for
> benchmarking only. Isn't there an alternative way where the node store could
> be exposed via the the benchmark's fixture?
>
> Michael
>
>
> On 25.09.17 11:00, Davide Giannella wrote:
>>
>> On 25/09/2017 07:05, Chetan Mehrotra wrote:
>>>
>>> One way can be to expose NodeStore instance from the Oak class. Would
>>> that be ok to do?
>>
>>
>> I don't like it very much as it would make it too easy to access the
>> NodeStore from a consumer pov. `Oak` itself is already low level
>> therefore I'm not strongly objecting for adding such feature. However as
>> the Oak object accept the NodeStore already as part of the constructor I
>> would see if it is feasible to keep a reference to the NodeStore in the
>> AbstractTest itself and use it during repository construction.
>>
>> HTH
>> Davide
>>
>>
>

Re: Access to NodeStore instance within benchmark

Posted by Michael Dürig <md...@apache.org>.
I tend to agree with Davide. Especially since the use case is for 
benchmarking only. Isn't there an alternative way where the node store 
could be exposed via the the benchmark's fixture?

Michael

On 25.09.17 11:00, Davide Giannella wrote:
> On 25/09/2017 07:05, Chetan Mehrotra wrote:
>> One way can be to expose NodeStore instance from the Oak class. Would
>> that be ok to do?
> 
> I don't like it very much as it would make it too easy to access the
> NodeStore from a consumer pov. `Oak` itself is already low level
> therefore I'm not strongly objecting for adding such feature. However as
> the Oak object accept the NodeStore already as part of the constructor I
> would see if it is feasible to keep a reference to the NodeStore in the
> AbstractTest itself and use it during repository construction.
> 
> HTH
> Davide
> 
> 

Re: Access to NodeStore instance within benchmark

Posted by Davide Giannella <da...@apache.org>.
On 25/09/2017 07:05, Chetan Mehrotra wrote:
> One way can be to expose NodeStore instance from the Oak class. Would
> that be ok to do?

I don't like it very much as it would make it too easy to access the
NodeStore from a consumer pov. `Oak` itself is already low level
therefore I'm not strongly objecting for adding such feature. However as
the Oak object accept the NodeStore already as part of the constructor I
would see if it is feasible to keep a reference to the NodeStore in the
AbstractTest itself and use it during repository construction.

HTH
Davide