I'm having trouble using capabilities with the java compat libraries.
An isolated test case below gives the following stack trace:
The same exception can be triggered by sendRequest(..capability..) via underlying(). This is somewhat hacky, but sendRequest(..capability..) is not available in the java interface (maybe intentional?)
The output is:
The last code line fails with the exception above.
Note that the cc.getNodes() (which gives the java-version of the node) indicates the right capabilities, but the Scala node from nextNode version doesn't seem to have the capabilities?
This is on current HEAD (69c3a7ccbaf22d751f6282e7b6eb9dab19b04954), but the problem occurs on 0.6.29-SNAPSHOT as well.
A patch for RoundRobinLoadBalancerFactory.scala is attached, but this only fixes the divide-by-zero bug.. I still don't get any nodes, and my scala/norbert internals experience is not that high-level, so any pointers/patches/suggestions are welcome!
Found the problem, I think. In javacompat's javaNodeToScalaNode, a Scala node is created, but the capability is not passed on.
With the attached patch (java-cluster-capability-fix.patch), it seems to work as intended.