Sorry to ask for this right now when you are already very much into it, but do you mind rewriting the two java files into scala? It should be easier & shorter ... and then you can mark the classes as private[mllib]