Created
September 10, 2016 22:56
-
-
Save SudhakarReddyPeddinti/c5e0cc61e09817aee38c5385ea705360 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var l = List(34, 32, 132, 352) // Scala List | |
l.foreach{i => | |
val data:DataFrame = DataContainer.getDataFrame(i) // get DataFrame | |
val x = new MyClass(data) // initialize MyClass with new Object | |
x.setSettings(...) | |
x.calcSomething() | |
x.saveResults() // writes the Results into another Dataframe that is saved to HDFS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/questions/38069239/parallelize-avoid-foreach-loop-in-spark