Examples of MapPhase


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

  @Test
  public void testSerializeMapPhase() throws IOException
  {

    Function function = Function.newNamedJsFunction("the_func");
    MapPhase phase = new MapPhase(function, "Arg", true);

    jg.writeObject(phase);

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

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

  @Test
  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.