zeppelin/java
PJ Fanning 207d47f431
[MINOR] Set Snapshot version to 0.12.0-SNAPSHOT (#4720)
* change version to 0.11.1-SNAPSHOT

* change version

* change to 0.12.0-SNAPSHOT
2024-02-21 10:58:13 +09:00
..
src [ZEPPELIN-5848] Junit5 Migration (#4641) 2023-09-14 12:37:28 +02:00
pom.xml [MINOR] Set Snapshot version to 0.12.0-SNAPSHOT (#4720) 2024-02-21 10:58:13 +09:00
README.md [ZEPPELIN-3653] - New Java interpreter 2018-08-03 09:15:19 +08:00

Overview

Java interpreter for Apache Zeppelin

Architecture

Current interpreter implementation supports the static REPL. It compiles the code in memory, execute it and redirect the output to Zeppelin.

Technical overview

  • Upon starting an interpreter, an instance of JavaCompiler is created.

  • When the user runs commands with java, the JavaParser go through the code to get a class that contains the main method.

  • Then it replaces the class name with random class name to avoid overriding while compilation. It creates new out & err stream to get the data in new stream instead of the console, to redirect output to Zeppelin.

  • If there is any error during compilation, it can catch and redirect to Zeppelin.

  • JavaInterpreterUtils contains useful methods to print out Java collections and leverage Zeppelin's built in visualization.