See https://github.com/cloudera/livy/blob/master/repl/src/main/scala/com/cloudera/livy/repl/AbstractSparkInterpreter.scala#L72