I'm not sure if current Livy support setting env variables through REST API. But most of the Spark related environment variables you can find out a corresponding configuration like spark.[driver|executor].extraClasspath, you don't have to use env variables.
On Tue, Jul 25, 2017 at 9:34 AM, ayushi agarwal <[email protected]> wrote: > H <https://livy.incubator.apache.org/>ello, > > We have a requirement to set some environment variable at runtime before > starting a particular interactive session, but are unable to figure out a > way to do so. > > In Batch Livy there is env function present in builder from which we can > easily set any environment variable in batchsession.scala. For example, in > Batchsession.scala we can set: > > builder.env("SPARK_CLASSPATH", livyConf.get(LivyConf.LIVY_ > HBASE_CLASSPATH)) > > > This would spark_classpath environment variable to some value and would be > called before submitting spark_submit. > > But,similarly for interactive we are not able to figure out a way to set > env variable before starting our interactive session, as interactive livy > uses LivyClientBuilder and there is no env function present in Livy Client > builder. > > Can anyone please suggest a way to add environment variable for Livy > interactive sessions? > > Best, > -- > > *Ayushi Agarwal* > > *Data Engineer -PayPal* > > Tel: 720.503.4434 > > Email: ayushiag <[email protected]>[email protected] > > *www.linkedin.com/in/ayushiagarwalusc/en > <http://www.linkedin.com/in/ayushiagarwalusc/en>* >
