spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gourav Sengupta <gourav.sengu...@gmail.com>
Subject Re: Get broadcast (set in one method) in another method
Date Thu, 25 Jan 2018 23:00:47 GMT
Hi,

Just out of curiosity, in what sort of programming or designing paradigm
does this way of solving things fit in? In case you are trying functional
programming do you think that currying will help?

Regards,
Gourav Sengupta


On Thu, Jan 25, 2018 at 8:04 PM, Margusja <margus@roo.ee> wrote:

> Hi
>
> Maybe I am overthinking. I’d like to set broadcast in object A method y
>  and get it in object A method x.
>
> In example:
>
> object A {
>
> def main (args: Array[String]) {
> y()
> x()
> }
>
> def x() : Unit = {
> val a = bcA.value
> ...
> }
>
> def y(): String = {
> val bcA = sc.broadcast(a)
> …
> return “String value"
> }
>
> }
>
>
>
>
> ---
> Br
> Margus
>

Mime
View raw message