Hi Team,
I have Spark job with large number of dataframe operations.
This job reads various lookup data from external table as MySql and also
run lot of dataframe operations on large data on hdfs in parquet.
Job works fine in cluster however jobdriver code looks clumsy because of
large number of operations written in driver method.
I wish to organize these dataframe operations by grouping them Scala Object
methods.
Something like below
> *Object Driver {*
> *def main(args: Array[String]) {*
> * val df = Operations.process(sparkContext)*
> * }**}*
>
>
> *Object Operations {*
> * def process(sparkContext: SparkContext) : DataFrame = {*
> * //series of dataframe operations *
> * }**}*
My stupid question is would retrieving DF from other Scala Object's method
as return type is right thing do in terms of large scale.
Would returning DF to driver will cause all data get passed to the driver
code or it would be return just pointer to the DF?
Thanks,
Ashish