Package com.basho.riak.client.core.operations

Examples of com.basho.riak.client.core.operations.StoreBucketPropsOperation


    @Test
    public void ReproRiakTombstoneBehavior() throws ExecutionException, InterruptedException
    {
        // We're back to allow_mult=false as default
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(ns)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
        op.get();
       
       
        RiakClient client = new RiakClient(cluster);
        Location loc = new Location(ns, "test_fetch_key3");
       
View Full Code Here


    {
        // Enable allow_multi, store a new item, then do a read/modify/write
        // using the vclock
       
        Namespace ns = new Namespace(bucketType, bucketName.toString() + "_1");
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(ns)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
        op.get();
       
        RiakObject obj = new RiakObject().setValue(BinaryValue.create(value));
        Location location = new Location(ns, key);
      
        StoreOperation storeOp =
View Full Code Here

        return op.get().getBucketProperties();
    }
   
    private void storeBucketProps(StoreBucketPropsOperation.Builder builder) throws InterruptedException, ExecutionException
    {
        StoreBucketPropsOperation op =
            builder.build();
        cluster.execute(op);
       
        op.get();
    }
View Full Code Here

    public void testSimpleSearch() throws InterruptedException, ExecutionException
    {
        Assume.assumeTrue(legacyRiakSearch);
       
        Namespace namespace = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(namespace)
                .withLegacyRiakSearchEnabled(true)
                .build();
       
        cluster.execute(op);
        op.get();
       
        prepSearch(bucketType, bucketName);
       
        SearchOperation searchOp = new SearchOperation.Builder(bucketName, "Alice*").build();
       
View Full Code Here

        assertTrue(putOp.isSuccess());
       
        assureIndexExists("test_index");
       
        Namespace namespace = new Namespace(yokozunaBucketType, searchBucket);
        StoreBucketPropsOperation propsOp =
            new StoreBucketPropsOperation.Builder(namespace)
                .withSearchIndex("test_index")
                .build();
        cluster.execute(propsOp);
        propsOp.await();
       
        if (!propsOp.isSuccess())
        {
            assertTrue(propsOp.cause().toString(), propsOp.isSuccess());
        }
       
        Thread.sleep(5000);
       
        prepSearch(yokozunaBucketType, searchBucket);
View Full Code Here

    @Test
    public void updateAndResolveParameterizedTypeJSON() throws ExecutionException, InterruptedException
    {
        // We're back to allow_mult=false as default
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(ns)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
        op.get();
       
        RiakClient client = new RiakClient(cluster);
        Location loc = new Location(ns, "test_ORM_key4");
       
        MyUpdate update = new MyUpdate();
View Full Code Here

    @Test
    public void updateAndResolveParameterizedTypeCustom() throws ExecutionException, InterruptedException
    {
        // We're back to allow_mult=false as default
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(ns)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
        op.get();
       
       
        RiakClient client = new RiakClient(cluster);
        Location loc = new Location(ns, "test_ORM_key5");
       
View Full Code Here

    {
        final BinaryValue key = BinaryValue.unsafeCreate("my_key_3".getBytes());
        final String value = "{\"value\":\"value\"}";
       
        Namespace namespace = new Namespace(bucketType, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(namespace)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
        op.get();
       
        RiakObject rObj = new RiakObject().setValue(BinaryValue.create(value));
        Location location = new Location(namespace, key);
        StoreOperation storeOp =
            new StoreOperation.Builder(location)
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.operations.StoreBucketPropsOperation

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.