Package com.basho.riak.client.core.query

Examples of com.basho.riak.client.core.query.Namespace


   
    @Test
  public void testBucketInputSerializerWithTypeAndFilter() throws IOException
  {

    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);
View Full Code Here


   
   
  @Test
  public void testSerializeBucketKeyInput() throws IOException
  {
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
    ArrayList<BucketKeyInput.IndividualInput> inputs = new ArrayList<BucketKeyInput.IndividualInput>();
    inputs.add(new BucketKeyInput.IndividualInput(new Location(ns, "key")));
    inputs.add(new BucketKeyInput.IndividualInput(new Location(ns, "key"), "data"));
    BucketKeyInput input = new BucketKeyInput(inputs);
View Full Code Here

  }

    @Test
  public void testSerializeBucketKeyInputWithType() throws IOException
  {
        Namespace ns = new Namespace("type", "bucket");
    ArrayList<BucketKeyInput.IndividualInput> inputs = new ArrayList<BucketKeyInput.IndividualInput>();
    inputs.add(new BucketKeyInput.IndividualInput(new Location(ns, "key")));
    inputs.add(new BucketKeyInput.IndividualInput(new Location(ns, "key"), "data"));
    BucketKeyInput input = new BucketKeyInput(inputs);
View Full Code Here

  }
   
  @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);
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);
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);
View Full Code Here

{
   
    @Test
    public void testFetchDefaultBucketProps() throws InterruptedException, ExecutionException
    {
        Namespace namespace = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        BucketProperties props = fetchBucketProps(namespace);
        assertTrue(props.hasNVal());
        assertTrue(props.hasAllowMulti());
        assertTrue(props.hasBasicQuorum());
        assertTrue(props.hasBigVClock());
View Full Code Here

        OrmExtracted orm = converter.fromDomain(pojo , null, null);
        RiakObject ro = orm.getRiakObject();
       
        assertNotNull(ro.getValue());
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
        Pojo pojo2 = converter.toDomain(ro, new Location(ns, "key"));
       
        assertEquals(pojo.foo, pojo2.foo);
        assertEquals(pojo.bar, pojo2.bar);
       
View Full Code Here

    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

Related Classes of com.basho.riak.client.core.query.Namespace

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.