Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Zeppelin - modify default syntax highlight

I am using Zeppelin (ver. 0.6.0.) along with Spark (ver. 1.6.1.) and Hadoop (ver. 2.6.).

Zeppelin gives users option to use several interpreters, but I decided to exclusively use Python.

I managed to set my default interpreter to org.apache.zeppelin.spark.PySparkInterpreter. By creating zeppelin-site.xml file from template; and putting PySparkInterpreter in front of org.apache.zeppelin.spark.SparkInterpreter inside zeppelin.interpreters property tag.

So far everything works correctly. I don't have to insert %pyspark at top of every cell in order write Python code.

Problem: Syntax highlight of code which is used is for Scala.

In order to have Python syntax highlight I have to do:

  1. Empty content of cell (copy it)
  2. Insert only %pyspark and press SHIFT + ENTER
  3. Wait for error to occur and paste code back into cell.

Question: Where can I modify default syntax highlight for Zeppelin notebook and set it to use Python one?

Kind regards!

like image 989
jk46820 Avatar asked Mar 01 '26 15:03

jk46820


1 Answers

It's most likely will be possible once https://issues.apache.org/jira/browse/ZEPPELIN-139 is resolved.

like image 121
Tagar Avatar answered Mar 03 '26 05:03

Tagar