Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Scala cannot access private inner classes, making Indexes nearly impossible to instantiate [JIRA: CLIENTS-689] #584

Description

@TJC

The current recommended way of getting an index is something like:

riakObj.getIndexes.getIndex( StringBinIndex.Name("example") )

Except that the .Name class within StringBinIndex cannot be accessed from Scala, and that is not going to change.

Making the .Name class and constructors on RiakIndexes public would sort this out.

Activity

  1. changed the title [-]Scala cannot access private inner classes, making Indexes nearly impossible to instantiate[/-] [+]Scala cannot access private inner classes, making Indexes nearly impossible to instantiate [JIRA: CLIENTS-689][/+] on Dec 17, 2015
  2. Basho-JIRA commented on Dec 17, 2015

    @Basho-JIRA

    Here is a code snippet we are using in Spark Connector [link link|https://github.com/basho/spark-riak-connector/blob/develop/test-utils/src/main/scala/com/basho/riak/spark/rdd/RiakFunctions.scala#L124-L143]. It might be a good idea for me to review 2i java client implementation for the discrepancies

    _[posted via JIRA by Sergey Galkin]_

  3. TJC commented on Dec 17, 2015

    @TJC
    Author

    Hi Sergey, that setup of parameterised getIndex() with the Index.named() constructor (instead of the Index.Name() constructor) was how I managed to get it to work in the end.
    However the documentation seems to prefer the Index.Name() constructor.

  4. alexmoore commented on Jan 20, 2016

    @alexmoore
    Contributor

    @TJC What documentation preferred the Index.Name() constructor? I can put in a fix for that if I can find it.

  5. TJC commented on Jan 21, 2016

    @TJC
    Author

    It's been over a month.. took me a while to find it again.
    http://imgur.com/wMDiue1
    (The javadoc for the riak client seems kinda sucky -- the URL doesn't contain the info needed to get back to the page it's actually displaying)

  6. added a commit that references this issue on Jan 26, 2016
  7. Basho-JIRA commented on Jan 26, 2016

    @Basho-JIRA

    fix is included on the https://github.com/basho/riak-java-client/tree/scala-improvements branch

    _[posted via JIRA by Alexander Moore]_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions