Examples of ReducePhase


Examples of com.basho.riak.client.api.commands.mapreduce.ReducePhase

  @Test
  public void testSerializeReducePhase() throws IOException
  {
    Function function = Function.newNamedJsFunction("the_func");
    ReducePhase phase = new ReducePhase(function, "Arg", true);

    jg.writeObject(phase);

    assertEquals("{\"reduce\":{\"language\":\"javascript\",\"name\":\"the_func\",\"keep\":true,\"arg\":\"Arg\"}}", out.toString());
  }
View Full Code Here

Examples of com.basho.riak.client.api.commands.mapreduce.ReducePhase

  public void testSerializeMapReduceSpec() throws IOException
  {

    ArrayList<MapReducePhase> phases = new ArrayList<MapReducePhase>();
    phases.add(new MapPhase(Function.newNamedJsFunction("map_func")));
    phases.add(new ReducePhase(Function.newNamedJsFunction("reduce_func")));
    phases.add(new LinkPhase("bucket", "tag"));
    BucketInput input = new BucketInput(new Namespace("bucket"), Collections.<KeyFilter>emptyList());

    MapReduceSpec spec = new MapReduceSpec(input, phases, 1000L);
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.