Hello, I am trying to get the MapReduce to run using my cluster. I have a
3-node cluster[192.168.0.41,192.168.0.42,192.168.0.43] up and running. 

I am trying with this example:

try{
            IRiakClient client = RiakFactory.pbcClient("192.168.0.41",
8087);
            Bucket myBucket = client.fetchBucket("Productos").execute();//I
ALREADY HAVE DATA IN A BUCKET CALLED 'PRODUCTOS'.
            BucketMapReduce m = client.mapReduce("Productos");
            m.addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), true);
            MapReduceResult result = m.execute();
            System.out.println(result.getResultRaw());
            Collection<Producto> tmp = result.getResult(Producto.class);
            for (Producto p : tmp) {
                System.out.println(p.Nombre);
            }
            client.shutdown();
        }
        
        catch(Exception Ex){
            System.out.println(Ex.getMessage());
        } 


I am getting the following error message:
com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor
found for type [simple type, class Clases.Producto]: can not instantiate
from JSON object (need to add/enable type information?)
 at [Source: [B@9e493eb; line: 1, column: 2]

I have a "Producto" class which has the following:

public String ID;
public String Nombre;
public String Descripcion;
public String Vendedor;
public String Url;
public String Precio;

The MAIN objective I want to get to by using MapReduce is to get the top ten
words use to describe the products in the cluster, this is then MapReducing
the String Descripcion.



--
View this message in context: 
http://riak-users.197444.n3.nabble.com/MapReduce-Java-RIAK-API-tp4032050.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to