Scala: The Util is not accessible in def main

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Scala: The Util is not accessible in def main

Soheil Pourbafrani
Hi, 
I want to use org.apache.spark.util.Utils library in def main but I got the error:

Symbole Util is not accessible from this place. Here is the code:

val temp = tokens.map(word => Utils.nonNegativeMod(x, y))

How can I make it accessible?
Reply | Threaded
Open this post in threaded view
|

Re: Scala: The Util is not accessible in def main

Mark Hamstra
It is intentionally not accessible in your code since Utils is internal Spark code, not part of the public API. Changing Spark to make that private code public would be inviting trouble, or at least future headaches. If you don't already know how to build and maintain your own custom fork of Spark with those private Utils made public, then you probably shouldn't be thinking about doing so.

On Sun, Nov 11, 2018 at 2:13 AM Soheil Pourbafrani <[hidden email]> wrote:
Hi, 
I want to use org.apache.spark.util.Utils library in def main but I got the error:

Symbole Util is not accessible from this place. Here is the code:

val temp = tokens.map(word => Utils.nonNegativeMod(x, y))

How can I make it accessible?