Examples of BucketMapReduce


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

   
    private void erlangBucketMR(String bucketType) throws InterruptedException, ExecutionException
    {
        initValues(bucketType);
        Namespace ns = new Namespace(bucketType, mrBucketName);
        BucketMapReduce bmr =
            new BucketMapReduce.Builder()
                .withNamespace(ns)
                .withMapPhase(Function.newErlangFunction("riak_kv_mapreduce", "map_object_value"), false)
                .withReducePhase(Function.newErlangFunction("riak_kv_mapreduce", "reduce_string_to_integer"), false)
                .withReducePhase(Function.newErlangFunction("riak_kv_mapreduce", "reduce_sort"), true)
View Full Code Here

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

    private void JsBucketMR(String bucketType) throws InterruptedException, ExecutionException
    {
        initValues(bucketType);
       
        Namespace ns = new Namespace(bucketType, mrBucketName);
        BucketMapReduce bmr =
            new BucketMapReduce.Builder()
                .withNamespace(ns)
                .withMapPhase(Function.newNamedJsFunction("Riak.mapValuesJson"), false)
                .withReducePhase(Function.newNamedJsFunction("Riak.reduceNumericSort"), true)
                .build();
View Full Code Here

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

    public void multiPhaseResult() throws InterruptedException, ExecutionException
    {
        initValues(Namespace.DEFAULT_BUCKET_TYPE);
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, mrBucketName);
        BucketMapReduce bmr =
            new BucketMapReduce.Builder()
                .withNamespace(ns)
                .withMapPhase(Function.newNamedJsFunction("Riak.mapValuesJson"), true)
                .withReducePhase(Function.newNamedJsFunction("Riak.reduceNumericSort"), true)
                .build();
View Full Code Here

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

    @Test
    public void keyFilter() throws InterruptedException, ExecutionException
    {
        initValues(Namespace.DEFAULT_BUCKET_TYPE);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, mrBucketName);
        BucketMapReduce bmr =
            new BucketMapReduce.Builder()
                .withNamespace(ns)
                .withMapPhase(Function.newNamedJsFunction("Riak.mapValuesJson"))
                .withReducePhase(Function.newErlangFunction("riak_kv_mapreduce", "reduce_sort"),true)
                .withKeyFilter(new TokenizeFilter("_",3))
View Full Code Here

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

    {
        Assume.assumeTrue(testBucketType);
       
        initValues(bucketType.toString());
        Namespace ns = new Namespace(bucketType.toString(), mrBucketName);
        BucketMapReduce bmr =
            new BucketMapReduce.Builder()
                .withNamespace(ns)
                .withMapPhase(Function.newAnonymousJsFunction(
                    "function(value, keydata, arg) {" +
                        "  var data = value.values[0].data;" +
View Full Code Here

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

        Assume.assumeTrue(testBucketType);

        initValues(bucketType.toString());
       
         Namespace ns = new Namespace(bucketType.toString(), mrBucketName);
        BucketMapReduce bmr =
            new BucketMapReduce.Builder()
                .withNamespace(ns)
                .withKeyFilter(new TokenizeFilter("_",3))
                .withKeyFilter(new StringToIntFilter())
                .withKeyFilter(new LogicalAndFilter(new LessThanFilter<Integer>(50), new GreaterThanFilter<Integer>(45)))
View Full Code Here

Examples of com.basho.riak.client.query.BucketMapReduce

     * (non-Javadoc)
     *
     * @see com.basho.riak.newapi.RiakClient#mapReduce(java.lang.String)
     */
    public BucketMapReduce mapReduce(String bucket) {
        return new BucketMapReduce(rawClient, bucket);
    }
View Full Code Here

Examples of com.basho.riak.client.query.BucketMapReduce

     * (non-Javadoc)
     *
     * @see com.basho.riak.newapi.RiakClient#mapReduce(java.lang.String)
     */
    public BucketMapReduce mapReduce(String bucket) {
        return new BucketMapReduce(rawClient, bucket);
    }
View Full Code Here

Examples of com.basho.riak.client.query.BucketMapReduce

     * (non-Javadoc)
     *
     * @see com.basho.riak.newapi.RiakClient#mapReduce(java.lang.String)
     */
    public BucketMapReduce mapReduce(String bucket) {
        return new BucketMapReduce(rawClient, bucket);
    }
View Full Code Here

Examples of com.basho.riak.client.query.BucketMapReduce

     * (non-Javadoc)
     *
     * @see com.basho.riak.newapi.RiakClient#mapReduce(java.lang.String)
     */
    public BucketMapReduce mapReduce(String bucket) {
        return new BucketMapReduce(rawClient, bucket);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.