Examples of BucketInput


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

    @Test
  public void testBucketInputSerializer() throws IOException
    {
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
        BucketInput input = new BucketInput(ns, null);

    jg.writeObject(input);
        assertEquals("\"bucket\"", out.toString());
    }
View Full Code Here

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

  {

    Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
    ArrayList<KeyFilter> filters = new ArrayList<KeyFilter>();
    filters.add(new EndsWithFilter("dave"));
    BucketInput input = new BucketInput(ns, filters);

    jg.writeObject(input);

    assertEquals("{\"bucket\":\"bucket\",\"key_filters\":[[\"ends_with\",\"dave\"]]}", out.toString());
View Full Code Here

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

  }
   
    @Test public void testBucketInputSerializerWithType() throws IOException
    {
        Namespace ns = new Namespace("type", "bucket");
        BucketInput input = new BucketInput(ns, null);
        jg.writeObject(input);
        assertEquals("[\"type\",\"bucket\"]", out.toString());
    }
View Full Code Here

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

  {

    Namespace ns = new Namespace("type", "bucket");
    ArrayList<KeyFilter> filters = new ArrayList<KeyFilter>();
    filters.add(new EndsWithFilter("dave"));
    BucketInput input = new BucketInput(ns, filters);

    jg.writeObject(input);

    assertEquals("{\"bucket\":[\"type\",\"bucket\"],\"key_filters\":[[\"ends_with\",\"dave\"]]}", out.toString());
View Full Code Here

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

    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);

    jg.writeObject(spec);
       
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.