Private objects and traits in spark and ml

626 Views Asked by At

Spark recently fleshed out the ML Pipeline stuff so I have been looking into writing my own transformers. However some useful utilities are private to spark or ml. Take for example the Identifiable trait / object which are private to spark. I would very much like to use the randomUID method and am curious as to why this is not exposed?

1

There are 1 best solutions below

2
On BEST ANSWER

The short version of the answer is that Spark is aiming for API stability, and anything where people think they might want to change how it functions is therefor marked as private. Part of this happens since as part of the PR merge process, if you have to be very explicit to make a new public API, so it's often easier to just make private versions of the things you need. I realize that this can maybe be a bit frustrating, if there is a specific part of Spark you think should be added to the public API you can try filing a JIRA.