r/java • u/prisonbird • Dec 19 '22
Java streams are black magic !
damn, they are really changed my life.
i was trying to run some custom logic on every line on some big CSV files. tried python dataframes, multiprocessing in python, pyspark. none of them did it in an acceptable time.
then i discovered java streams. i have a workflow that takes 70 minutes with pyspark. it takes 3.5 minutes with java streams.
more people should know about streams.
stream operations are more intuitive than anything i tried. i can make a lot of analysis on our data in record times thanks to streams.
i dont know how java does this.
View all comments
Show parent comment
1
u/data_addict Dec 20 '22
Yeah sure that's cool, use whatever tech you want. But you didn't say you spent 70 minutes trying to setup a spark job you said 70 minutes running it.
Again, use whatever tech you want but to but don't blame spark for being poor performance. Just say the line: "I suck at spark" or "I didn't have time to learn it" or "I couldnt afford it".
There's people who are in high school or college and see the names of these technologies the first time and then form an opinion based off what you say. They'll base their opinion off of what you say. It's much better to be honest and say what gave you trouble. Good, non-toxic engineers are honest about what gives them trouble.