Accumulator null pointer exception

2022-02-28 Thread Abhimanyu Kumar Singh
I;m getting an interesting null pointer exception when trying to add any value in a custom accumulator. *code*: object StagingFacade { //Accumulator declared var filesAccumulator : CollectionAccumulator[(String, String, String)] = _ def apply(appArgs: Array[String], spark:

Re: [Spark UDF]: Where does UDF stores temporary Arrays/Sets

2022-01-26 Thread Abhimanyu Kumar Singh
more efficient. > > On Wed, Jan 26, 2022 at 9:47 AM Abhimanyu Kumar Singh < > abhimanyu.kr.sing...@gmail.com> wrote: > >> I'm doing some complex operations inside spark UDF (parsing huge XML). >> >> Dataframe: >> | value | >> | Content of XML File 1 | >>

[Spark UDF]: Where does UDF stores temporary Arrays/Sets

2022-01-26 Thread Abhimanyu Kumar Singh
I'm doing some complex operations inside spark UDF (parsing huge XML). Dataframe: | value | | Content of XML File 1 | | Content of XML File 2 | | Content of XML File N | val df = Dataframe.select(UDF_to_parse_xml(value)) UDF looks something like: val XMLelements : Array[MyClass1] =