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

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


    }
   
    private void initValuesOneToN(String bucketType) throws InterruptedException
    {
        String keyPrefix = "mr_test_";
        Namespace ns = new Namespace(bucketType, mrBucketName);
        for (int i = 0; i < 200; i++)
        {
            Location loc = new Location(ns, keyPrefix + i);
            RiakObject ro = new RiakObject().setContentType("text/plain")
                .setValue(BinaryValue.create(Integer.toString(i)));
View Full Code Here


    @Test
    public void matchIndex() throws InterruptedException, ExecutionException
    {
        Assume.assumeTrue(test2i);
        initValuesOneToN(Namespace.DEFAULT_BUCKET_TYPE);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, mrBucketName);
        IndexMapReduce imr = new IndexMapReduce.Builder()
                            .withNamespace(ns)
                            .withIndex("user_id_int")
                            .withMatchValue(1L)
                            .withMapPhase(Function.newAnonymousJsFunction(
View Full Code Here

    {
        Assume.assumeTrue(testBucketType);
        Assume.assumeTrue(test2i);
       
        initValuesOneToN(bucketType.toString());
        Namespace ns = new Namespace(bucketType.toString(), mrBucketName);
        IndexMapReduce imr = new IndexMapReduce.Builder()
                            .withNamespace(ns)
                            .withIndex("user_id_int")
                            .withMatchValue(1L)
                            .withMapPhase(Function.newAnonymousJsFunction(
View Full Code Here

    public void rangeIndex() throws InterruptedException, ExecutionException
    {
        Assume.assumeTrue(test2i);
        initValues(Namespace.DEFAULT_BUCKET_TYPE);
       
        Namespace ns = new Namespace(mrBucketName);
        IndexMapReduce imr = new IndexMapReduce.Builder()
                            .withNamespace(ns)
                            .withIndex("user_id_int")
                            .withRange(0, 19)
                            .withMapPhase(Function.newAnonymousJsFunction(
View Full Code Here

    {
        Assume.assumeTrue(testBucketType);
        Assume.assumeTrue(test2i);
       
        initValues(bucketType.toString());
        Namespace ns = new Namespace(bucketType.toString(), mrBucketName);
        IndexMapReduce imr = new IndexMapReduce.Builder()
                            .withNamespace(ns)
                            .withIndex("user_id_int")
                            .withRange(0, 19)
                            .withMapPhase(Function.newAnonymousJsFunction(
View Full Code Here

    @Before
    public void changeBucketProps() throws ExecutionException, InterruptedException
    {
        if (testBucketType)
        {
            Namespace ns = new Namespace(bucketType.toString(), mrBucket);
            StoreBucketProperties op = new StoreBucketProperties.Builder(ns).withAllowMulti(false).build();
            client.execute(op);
        }
    }
View Full Code Here

    }
   
    @After
    public void clearMrBucket() throws InterruptedException, ExecutionException
    {
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, mrBucket);
        resetAndEmptyBucket(ns);
        if (testBucketType)
        {
            ns = new Namespace(bucketType.toString(), mrBucket);
            resetAndEmptyBucket(ns);
        }
    }
View Full Code Here

    obj.setValue(BinaryValue.create("Alice was beginning to get very tired of sitting by her sister on the " +
        "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 ns = new Namespace(bucketType, mrBucket);
    Location location = new Location(ns, "p1");
    client.execute(new StoreValue.Builder(obj).withLocation(location).build());

    obj.setValue(BinaryValue.create("So she was considering in her own mind (as well as she could, for the " +
        "hot day made her feel very sleepy and stupid), whether the pleasure " +
View Full Code Here

   
  private void JsBucketKeyMR(String bucketType) throws InterruptedException, ExecutionException, IOException
  {
    initValues(bucketType);
       
        Namespace ns = new Namespace(bucketType, mrBucket);
    MapReduce mr = new BucketKeyMapReduce.Builder()
        .withLocation(new Location(ns, "p1"))
        .withLocation(new Location(ns, "p2"))
        .withLocation(new Location(ns, "p3"))
        .withMapPhase(Function.newAnonymousJsFunction(
View Full Code Here

    }
   
    private void erlangBucketKeyMR(String bucketType) throws ExecutionException, InterruptedException
    {
        initValues(bucketType);
        Namespace ns = new Namespace(bucketType, mrBucket);
       
        MapReduce mr = new BucketKeyMapReduce.Builder()
        .withLocation(new Location(ns, "p1"))
        .withLocation(new Location(ns, "p2"))
        .withLocation(new Location(ns, "p3"))
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.