Package mungbean.protocol.command

Examples of mungbean.protocol.command.MapReduce


        protected void mapReduceOperationCanBeExecuted() {
            final DBCollection<Map<String, Object>> collection = context.openCollection("foo2");
            for (int a = 0; a < 10; a++) {
                collection.save(newDoc(new ObjectId(), a));
            }
            MapReduce mapReduce = new MapReduce("function(){emit(this.foo%2==0?\"even\":\"odd\",1); }", "function(k, vals){ var sum=0; for(var i in vals) sum += vals[i]; return sum;}");
            mapReduce.setVerbose(true);
            MapReduceResult result = collection.query(mapReduce, new Query());
            specify(result.wasOk());
        }
View Full Code Here

TOP

Related Classes of mungbean.protocol.command.MapReduce

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.