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

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


       
        String keyPrefix = "key_";
        String valuePrefix = "value_";
        List<Location> locations = new LinkedList<Location>();
        List<BinaryValue> values = new LinkedList<BinaryValue>();
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
       
        // Store some stuff
        for (int i = 0; i < 5; i++)
        {
            String key = keyPrefix + i;
View Full Code Here


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

                    "bank, and of having nothing to do: once or twice she had peeped into the " +
                    "book her sister was reading, but it had no pictures or conversations in " +
                    "it, 'and what is the use of a book,' thought Alice 'without pictures or " +
                    "conversation?'\"}"));

        Namespace namespace = new Namespace(searchBucketType, searchBucket);
        Location location = new Location(namespace, BinaryValue.unsafeCreate("p1".getBytes()));
        StoreOperation storeOp =
            new StoreOperation.Builder(location)
                .withContent(obj)
                .build();
View Full Code Here

    {
       
        String indexName = "test_index";
        String keyBase = "my_key";
        String value = "value";
        Namespace ns = new Namespace(bucketType, bucketName.toString());
       
        setupIndexTestData(ns, indexName, keyBase, value);
       
        SecondaryIndexQueryOperation.Query query =
            new SecondaryIndexQueryOperation.Query.Builder(ns, BinaryValue.unsafeCreate((indexName + "_int").getBytes()))
View Full Code Here

    {
       
        String indexName = "test_index";
        String keyBase = "my_key";
        String value = "value";
        Namespace ns = new Namespace(bucketType, bucketName.toString());
       
        for (long i = 0; i < 100; i++)
        {
            RiakObject obj = new RiakObject().setValue(BinaryValue.create(value));
View Full Code Here

    {
       
        String indexName = "test_index";
        String keyBase = "my_key";
        String value = "value";
        Namespace ns = new Namespace(bucketType, bucketName.toString());   
       
        setupIndexTestData(ns, indexName, keyBase, value);

           
        SecondaryIndexQueryOperation.Query query =
View Full Code Here

    private void testNoSortWithNoPaging(String bucketType) throws InterruptedException, ExecutionException
    {

        String indexName = "test_index_pagination";
        String value = "value";
        Namespace ns = new Namespace(bucketType, bucketName.toString());
       
        setupIndexTestData(ns, indexName, "", value);

        SecondaryIndexQueryOperation.Query query =
            new SecondaryIndexQueryOperation.Query.Builder(ns, BinaryValue.unsafeCreate((indexName + "_int").getBytes()))
View Full Code Here

    private void testSortWithNoPaging(String bucketType) throws InterruptedException, ExecutionException
    {

        String indexName = "test_index_pagination";
        String value = "value";
        Namespace ns = new Namespace(bucketType, bucketName.toString());

        setupIndexTestData(ns, indexName, "", value);

       
        SecondaryIndexQueryOperation.Query query =
View Full Code Here

    private void testNoSortWithPaging(String bucketType) throws InterruptedException, ExecutionException
    {

        String indexName = "test_index_pagination";
        String value = "value";
        Namespace ns = new Namespace(bucketType, bucketName.toString());
       
        setupIndexTestData(ns, indexName, "", value);

        try
        {
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.