Package com.basho.riak.client.api.commands.mapreduce

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


  @Test
  public void testSearializeIndexInputMatch() throws Exception
  {
    Namespace ns = new Namespace("bucket");
    IndexInput.MatchCriteria<String> criteria = new IndexInput.MatchCriteria<String>("dave");
    IndexInput input = new IndexInput(ns, "index_int", criteria);

    jg.writeObject(input);
    assertEquals("{\"bucket\":\"bucket\",\"index\":\"index_int\",\"key\":\"dave\"}", out.toString());
  }
View Full Code Here


    @Test
  public void testSearializeIndexInputMatchWithType() throws Exception
  {
    Namespace ns = new Namespace("type", "bucket");
        IndexInput.MatchCriteria<String> criteria = new IndexInput.MatchCriteria<String>("dave");
    IndexInput input = new IndexInput(ns, "index_int", criteria);

    jg.writeObject(input);

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

  @Test
  public void testSearializeIndexInputRange() throws Exception
  {
    Namespace ns = new Namespace("bucket");
    IndexInput.RangeCriteria<Integer> criteria = new IndexInput.RangeCriteria<Integer>(1, 2);
    IndexInput input = new IndexInput(ns, "index_int", criteria);

    jg.writeObject(input);

    assertEquals("{\"bucket\":\"bucket\",\"index\":\"index_int\",\"start\":1,\"end\":2}", out.toString());
  }
View Full Code Here

    @Test
  public void testSearializeIndexInputRangeWithType() throws Exception
  {
    Namespace ns = new Namespace("type","bucket");
    IndexInput.RangeCriteria<Integer> criteria = new IndexInput.RangeCriteria<Integer>(1, 2);
    IndexInput input = new IndexInput(ns, "index_int", criteria);

    jg.writeObject(input);

    assertEquals("{\"bucket\":[\"type\",\"bucket\"],\"index\":\"index_int\",\"start\":1,\"end\":2}", out.toString());
  }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.api.commands.mapreduce.IndexInput

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