Examples of PhaseFunction


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

  @Test
  public void testSerializeErlangFunction() throws IOException
  {
    Function function = Function.newErlangFunction("mod", "fun");
     PhaseFunction phaseFunction = new PhaseFunction(function, true);

    jg.writeObject(phaseFunction);

    assertEquals("{\"language\":\"erlang\",\"module\":\"mod\",\"function\":\"fun\",\"keep\":true}", out.toString());
  }
View Full Code Here

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

  @Test
  public void testSerializeAnonJsFunction() throws IOException
  {
    Function function = Function.newAnonymousJsFunction("function() {}");
    PhaseFunction phaseFunction = new PhaseFunction(function, true);

    jg.writeObject(phaseFunction);

    assertEquals("{\"language\":\"javascript\",\"source\":\"function() {}\",\"keep\":true}", out.toString());
  }
View Full Code Here

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

  @Test
  public void testSerializeNamedJsFunction() throws IOException
  {
    Function function = Function.newNamedJsFunction("the_func");
    PhaseFunction phaseFunction = new PhaseFunction(function, true);

    jg.writeObject(phaseFunction);

    assertEquals("{\"language\":\"javascript\",\"name\":\"the_func\",\"keep\":true}", out.toString());
  }
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.