Invalid status code '400' from .. error payload: "requirement failed: Session isn't active

后端 未结 2 602
[愿得一人]
[愿得一人] 2021-01-06 23:05

I am running Pyspark scripts to write a dataframe to a csv in jupyter Notebook as below:

df.coalesce(1).write.csv(\'Data1.csv\',header = \'true\')

2条回答
  •  北海茫月
    2021-01-07 00:02

    Judging by the output, if your application is not finishing with a FAILED status, that sounds like a Livy timeout error: your application is likely taking longer than the defined timeout for a Livy session (which defaults to 1h), so even despite the Spark app succeeds your notebook will receive this error if the app takes longer than the Livy session's timeout.

    If that's the case, here's how to address it:

    1. edit the /etc/livy/conf/livy.conf file (in the cluster's master node)
    2. set the livy.server.session.timeout to a higher value, like 8h (or larger, depending on your app)
    3. restart Livy to update the setting: sudo restart livy-server in the cluster's master
    4. test your code again

提交回复
热议问题