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 Julian Reschke <ju...@gmx.de> on 2015/03/03 07:49:13 UTC
Re: svn commit: r1663526 - in /jackrabbit/oak/trunk/oak-core/src:
main/java/org/apache/jackrabbit/oak/plugins/document/ main/java/org/apache/jackrabbit/oak/plugins/document/memory/
main/java/org/apache/jackrabbit/oak/plugins/document/mongo/ main/java/org/a...
On 2015-03-03 05:55, chetanm@apache.org wrote:
> Author: chetanm
> Date: Tue Mar 3 04:55:07 2015
> New Revision: 1663526
>
> URL: http://svn.apache.org/r1663526
> Log:
> OAK-2499 - Expose mongo and db versions for reporting purposes
>
> Applying a modified patch from Marius. The description is now a JSON string capturing required metadata attribute
> ...
This is ugly; I don't think it's a good idea to introduce JSON-shaped
strings here. If we need more structure, why not a Map?
Best regards, Julian
Re: svn commit: r1663526 - in /jackrabbit/oak/trunk/oak-core/src:
main/java/org/apache/jackrabbit/oak/plugins/document/ main/java/org/apache/jackrabbit/oak/plugins/document/memory/
main/java/org/apache/jackrabbit/oak/plugins/document/mongo/ main/java/o...
Posted by Chetan Mehrotra <ch...@gmail.com>.
Ack. Done with http://svn.apache.org/r1663854. Further DocumentStore
now returns a map of metadata and it should not be concerned now with
how this metadata gets serialized.
Chetan Mehrotra
On Tue, Mar 3, 2015 at 8:30 PM, Marius Petria <mp...@adobe.com> wrote:
> Hi Chetan,
>
> I commented also on the issue. Probably the best approach would be to
> register a String[] such that it can be read by PropertiesUtil.toMap
> (key=value). I think is the “standard” way to represent maps in OSGI
> properties.
>
> Marius
>
>
>
>
> On 3/3/15, 8:52 AM, "Chetan Mehrotra" <ch...@gmail.com> wrote:
>
>>On Tue, Mar 3, 2015 at 12:19 PM, Julian Reschke <ju...@gmx.de>
>>wrote:
>>> This is ugly; I don't think it's a good idea to introduce JSON-shaped
>>> strings here. If we need more structure, why not a Map?
>>
>>The description has to be finally converted to string to be published
>>as string service property. So probably DocumentStore API returns a
>>Map with method name like getMetadata and then
>>DocumentNodeStoreService serializes it as a JSON string.
>>
>>Would that work?
>>
>>Chetan Mehrotra
Re: svn commit: r1663526 - in /jackrabbit/oak/trunk/oak-core/src:
main/java/org/apache/jackrabbit/oak/plugins/document/
main/java/org/apache/jackrabbit/oak/plugins/document/memory/
main/java/org/apache/jackrabbit/oak/plugins/document/mongo/ main/java/o...
Posted by Marius Petria <mp...@adobe.com>.
Hi Chetan,
I commented also on the issue. Probably the best approach would be to
register a String[] such that it can be read by PropertiesUtil.toMap
(key=value). I think is the “standard” way to represent maps in OSGI
properties.
Marius
On 3/3/15, 8:52 AM, "Chetan Mehrotra" <ch...@gmail.com> wrote:
>On Tue, Mar 3, 2015 at 12:19 PM, Julian Reschke <ju...@gmx.de>
>wrote:
>> This is ugly; I don't think it's a good idea to introduce JSON-shaped
>> strings here. If we need more structure, why not a Map?
>
>The description has to be finally converted to string to be published
>as string service property. So probably DocumentStore API returns a
>Map with method name like getMetadata and then
>DocumentNodeStoreService serializes it as a JSON string.
>
>Would that work?
>
>Chetan Mehrotra
Re: svn commit: r1663526 - in /jackrabbit/oak/trunk/oak-core/src:
main/java/org/apache/jackrabbit/oak/plugins/document/ main/java/org/apache/jackrabbit/oak/plugins/document/memory/
main/java/org/apache/jackrabbit/oak/plugins/document/mongo/ main/java/org/a...
Posted by Chetan Mehrotra <ch...@gmail.com>.
On Tue, Mar 3, 2015 at 12:19 PM, Julian Reschke <ju...@gmx.de> wrote:
> This is ugly; I don't think it's a good idea to introduce JSON-shaped
> strings here. If we need more structure, why not a Map?
The description has to be finally converted to string to be published
as string service property. So probably DocumentStore API returns a
Map with method name like getMetadata and then
DocumentNodeStoreService serializes it as a JSON string.
Would that work?
Chetan Mehrotra