What are you trying to achieve ? You should not use global variables in a spark 
application. Especially not adding to a list - that makes in most cases no 
sense.

If you want to put everything into a file then you should repartition to 1 .


> On 7. Apr 2018, at 19:07, klrmowse <klrmo...@gmail.com> wrote:
> 
> it gives null pointer exception...
> 
> is there a workaround for adding to an arrayList during .foreach of an rdd?
> 
> 
> thank you
> 
> 
> 
> 
> --
> Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe e-mail: user-unsubscr...@spark.apache.org
> 

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to