Hey Brian, so I added the no-arg constructor, and it seems to work. Now, I
don't know why it takes so long running the task... The only thing that
shows now is this in the console:

run:
java.io.IOException: Error receiving outputs: normal


Again, I am using this code:

try{
            IRiakClient client = RiakFactory.pbcClient("192.168.0.41",
8087);
            Bucket myBucket = client.fetchBucket("Productos").execute();
            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+"\n");
            }

            client.shutdown(); 
           
        }
        
        catch(Exception Ex){
            System.out.println(Ex.getMessage());
        } 

I can't seem to make it work, I just need to mapreduce the description of
each product in order to get the top ten most used words.

Thank you in advance.



--
View this message in context: 
http://riak-users.197444.n3.nabble.com/MapReduce-Java-RIAK-API-tp4032050p4032052.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