how to set livy.server.session.timeout on EMR cluster boostrap?

If you don't want the Livy session to go down at all, then set the property livy.server.session.timeout-check to false in /etc/livy/conf/livy.conf.

On EMR, livy-conf is the classification for the properties for livy's livy.conf file, so when creating an EMR cluster, choose advanced options with Livy as an application chosen to install, please pass this EMR configuration in the Enter Configuration field.

[{'classification': 'livy-conf','Properties': {'livy.server.session.timeout':'5h'}}]
  • On EMR, Livy binary is located at /etc/livy/, and so the config file is at /etc/livy/conf/livy.conf

To verify this,

  • Create an EMR cluster with a known ec2 key-pair, Livy and above config
  • Using the ec2 key-pair, login to the EC2 Master node associated with the cluster ssh -i some-ec2-key-pair.pem [email protected]
  • Navigate to /etc/livy/conf, vim livy.conf & see the updated value of livy.server.session.timeout