Examples of MapReduce


Examples of com.tinkerpop.gremlin.process.computer.MapReduce

        if (null == this.traversalSupplier) {
            throw new IllegalArgumentException("The configuration does not have a traversal supplier");
        }
        final Traversal<?, ?> traversal = this.traversalSupplier.get().get();
        traversal.getSteps().stream().filter(step -> step instanceof MapReducer).forEach(step -> {
            final MapReduce mapReduce = ((MapReducer) step).getMapReduce();
            this.mapReducers.add(mapReduce);
        });

        if (!(TraversalHelper.getEnd(traversal) instanceof SideEffectCapStep))
            this.mapReducers.add(new TraverserMapReduce(TraversalHelper.getEnd(traversal)));
View Full Code Here

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
Copyright © 2018 www.massapi.com. 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.