Hi Michael, I'm somewhat confused by your question; map/reduce doesn't really have anything to do with your Java POJO/class.
When using the Riak Java client and storing a POJO, the default converter (JSONConverter) uses the Jackson JSON library and converts the instance of your POJO into a JSON string and stores it in Riak. If you change that POJO class and store more things, the resulting JSON is obviously going to be different (in your case having an additional field named "minty"). When doing Map/Reduce, whatever JavaScript or Erlang functions you provide are executing in Riak and being given the data stored in Riak (the JSON you stored); they have no connection to Java. Can you expand on "Now the map reduce fails for that the new property" with what exactly the problem is? It sounds like you have a problem with your JavaScript or Erlang function(s). Thanks! - Roach On Mon, Nov 11, 2013 at 12:07 PM, Michael Guymon <[email protected]> wrote: > Hello, > > I have a (hopefully dumb) question about working with the Java client and > POJOs. I justed started tinkering with Riak and have created a simple > Account POJO and happily crammed it into a bucket "test1" and mapped reduced > it (hooray). The problem starts when I updated the Class for Account, adding > a new String property "minty". Now the map reduce fails for that the new > property in the bucket "test1". Seems like the POJO is always being > serialized to the format of the older Account class. If I create a new > bucket, "test2", and cram and reduce anew, everything works again. > > I have been grepping around the docs, but have not been able to zero in on > my issue. Am I doing something bone headed? Is it possible to update a > bucket to support a modified POJO class? > > thanks, > Michael > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
