Apache Spark YARN mode startup takes too long (10+ secs)

前端 未结 4 1212
小蘑菇
小蘑菇 2021-02-05 13:00

I’m running a spark application with YARN-client or YARN-cluster mode.

But it seems to take too long to startup.

It takes 10+ seconds to initialize the spark con

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 13:33

    This is pretty typical. My system takes about 20 seconds from running spark-submit until getting a SparkContext.

    As it says in the docs in a couple of places, the solution is to turn your driver into an RPC server. That way you initialize once, and then other applications can use the driver's context as a service.

    I am in the middle of doing this with my application. I am using http4s and turning my driver into a web server.

提交回复
热议问题