Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexMapReduce returning empty list #709

Open
lukasz-gosiewski opened this issue Nov 22, 2017 · 0 comments
Open

IndexMapReduce returning empty list #709

lukasz-gosiewski opened this issue Nov 22, 2017 · 0 comments

Comments

@lukasz-gosiewski
Copy link

lukasz-gosiewski commented Nov 22, 2017

Context

When using IndexMapReduce in Java client Riak is returning an empty list instead of proper results, despite that everything is working fine in Python and over HTTP.

Expected Behavior

Riak should return list of all objects containing specified index.

Actual Behavior

Riak is returning empty list instead

Steps to Reproduce

  1. Create bucket, name it and insert data into int
  2. Index this data with few indexes matching searched one
  3. Execute below code with few corrections to match your env
  4. Empty list arrives!

Your Environment

  • [ 2.1.1] Riak Java Client version
  • [ 1.8] Java version
  • [ArchLinux on client side, Ubuntu on server side ] Operating System / Distribution & Version
  • [ RiakClient.execute()] What methods were being executed during the error
MapReduce mapReduce = new IndexMapReduce.Builder()
                .withNamespace(new Namespace(transactionsBucketName))
                .withIndex("addr_out_" + BaseEncoding.base32().encode(address.getBytes()) + "_bin")
                .withRange(BinaryValue.unsafeCreate("0".getBytes()), BinaryValue.unsafeCreate("z".getBytes()))
                .withMapPhase(Function.newNamedJsFunction("Riak.mapValues"))
                .build();

        IndexMapReduce.Response response;

        try {
            response = riakClient.execute(mapReduce);
        } catch (ExecutionException | InterruptedException e) {
            log.error(e);
            throw new DataFetchException(e);
        }

        log.info(response);```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant