Why is my Spark streaming app so slow?

╄→尐↘猪︶ㄣ 提交于 2019-12-04 21:30:50

At first glance it seems that you just start your application with "spark-submit <your application>"

This means you are using the default allocation of memory and CPU's to your application (which is about 1cpu and 512MB of ram in most default cases)

This is assuming you are using YARN since you don't provide info on this.

Start your application with the appropriate resources and you'll see improvements.

Edit:

I see you are using a lot of lambdas, those need to be serialized. Do know that when using objects you are passing around the full object every time.

I.E. you are using the full object this.value and not just value. To fix this, you could use a local variable _value = this.value and use that to proceed.

This might provide you with a speedup.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!