question about java client

Paul Ingalls paul at fanzo.me
Tue Jul 30 16:38:47 EDT 2013


Hey Brian,

After a bit of messing around, I'm now dropping objects into the correct bucket using the links annotation.  However,  I am noticing that the json is including the metadata from the domain object, i.e. things tagged with @RiakKey, @RiakIndex or @RiakLinks.  I was under the impression this data would be left out.  I wouldn't care a whole lot, but when I'm getting data back in via a fetch, the JSONConverter is crashing saying it doesn't know how to convert the RiakLink object since there isn't an appropriate constructor for it.

Do I need to specifically @JsonIgnore fields tagged with one of the Riak tags?

Thanks!

Paul


Paul Ingalls
Founder & CEO Fanzo
paul at fanzo.me
@paulingalls
http://www.linkedin.com/in/paulingalls



On Jul 30, 2013, at 11:20 AM, Paul Ingalls <paul at fanzo.me> wrote:

> Ok, thats perfect.  I totally missed the annotation for links…
> 
> Will give that a shot…
> 
> Thanks!
> 
> Paul Ingalls
> Founder & CEO Fanzo
> paul at fanzo.me
> @paulingalls
> http://www.linkedin.com/in/paulingalls
> 
> 
> 
> On Jul 30, 2013, at 11:16 AM, Brian Roach <roach at basho.com> wrote:
> 
>> Paul,
>> 
>> I'm not quite sure I understand what you're asking.
>> 
>> If you do a fetch and have siblings each one is converted to your
>> domain object using the Converter and then passed as a Collection to
>> the ConflictResolver. Each sibling is going to include its links
>> and/or indexes as long as the Converter is injecting them into the
>> domain object and you can resolve them in the ConflictResolver.
>> 
>> The default JSONConverter, for example, injects them into your domain
>> object via annotations from the com.basho.riak.client.convert[1]
>> package.
>> 
>> Thanks,
>> Brian Roach
>> 
>> http://basho.github.io/riak-java-client/1.4.0/com/basho/riak/client/convert/package-summary.html
>> 
>> 
>> On Tue, Jul 30, 2013 at 11:41 AM, Paul Ingalls <paul at fanzo.me> wrote:
>>> Newbie with Riak, and looking at the java client.
>>> 
>>> Specifically, I've been digging into the domain mapping apis.  Looking into
>>> the code, it appears to me that, if I'm using links a bunch or even
>>> secondary indexes, that I could lose some data during the conflict
>>> resolution phase.  I see where links and other relevant user data gets
>>> cached during the conversion phase from the fetch and then patched back in
>>> during the conversion phase for the store.  However, it doesn't look like
>>> you have the opportunity during the resolution phase to merge metadata.
>>> Should I focus on using the raw client, or am I missing something?
>>> 
>>> Thanks!
>>> 
>>> Paul
>>> 
>>> 
>>> 
>>> 
>>> Paul Ingalls
>>> Founder & CEO Fanzo
>>> paul at fanzo.me
>>> @paulingalls
>>> http://www.linkedin.com/in/paulingalls
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users at lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130730/858ac303/attachment.html>


More information about the riak-users mailing list