Table of Contents

Apache Zeppelin

https://zeppelin.apache.org/

Local installation

In Container (Windows at Work)

cd C:\v\IdeaProjects\scalatest\docker
docker-compose up -d

Useful commands in the context of Windows and Docker

docker commit zeppelinForDev zeppelin-for-dev:latest

Directly (Windows at Work)

CAUTION: Zeppelin on Windows is not supported any more. Zeppelin starts, but does not really work. So, it would be better to use a container-based installation.

Location:

C:\v\pgm\zeppelin-0.11.0

To start:

cd C:\v\pgm\zeppelin-0.11.0\bin
zeppelin.cmd

Linux at Home

Location:

/mnt/sda4/development/zeppelin-0.11.0-bin-netinst/

To start as daemon:

cd /mnt/sda4/development/zeppelin-0.11.0-bin-netinst
./bin/zeppelin-daemon.sh

To start interactively:

cd /mnt/sda4/development/zeppelin-0.11.0-bin-netinst/bin
zeppelin.sh

Problems occured during installation

Git

Origin: git@78.47.83.54:/srv/git/heliumpackages.git

Spark interpreter

https://zeppelin.apache.org/docs/0.11.0/interpreter/spark.html

Debugging Zeppelin notebook paragraphs in IntelliJ

-- not wait for debugger (n=> JVM executes the code immediately)
export ZEPPELIN_INTP_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=6006"
-- If you want Java to wait for you to connect before executing the application, replace suspend=n with suspend=y. (is usually not necessary)
export ZEPPELIN_INTP_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=6006"
    ports:
      - 127.0.0.1:8080:8080
      - 127.0.0.1:8111:8111
      - 127.0.0.1:5005:5005
      - 127.0.0.1:6006:6006

To start a debugging session:

  1. start Zeppelin (from docker container or directly)
  2. open browser with the notebook and note which should be debugged
  3. start the necessary paragraph (IMPORTANT: do it before to start remote debug. The server should open the JVM debug port at first)
    • Zeppelin will show “Running…”
  4. start the remote debug in IntelliJ
    • maybe it should be made twice, because after the first click, the connection will break immediately (maybe it is so, because the debug port should be opened first (see the point above))
  5. IntelliJ should stop on the breakpoint

Note: it is not possible to set the value for a variable with F2 key (=“Set value”). But it can be done with “Evaluate” functionality. E.g. “var1=123”. See bug description

See also: How to diagnose Zeppelin

Running Helium Visualization in development mode

https://zeppelin.apache.org/docs/0.11.0/development/helium/writing_visualization_basic.html#4-run-in-dev-mode

Prerequisites:

sudo npm install --global yarn

So in short:

# Linux at home
cd /mnt/sda4/development/workspaces.zeppelin/zeppelin/zeppelin-web
nvm use 16.20.2
yarn run dev:helium

# all in one
cd /mnt/sda4/development/workspaces.zeppelin/zeppelin/zeppelin-web && nvm use 16.20.2 && yarn run dev:helium


# Linux at work 
cd /v/IdeaProjects/zeppelin/zeppelin-web && yarn run dev:helium

Display a table for tests

%sh echo -e "%table key\tvalue\nsun\t-100\nmoon\t20"

Problems occured

These problems are occured in my Docker-based Zeppelin instance. It was not worked properly on some places, so it was necessary to make some configuration changes.

Loading JARs

The default spark interpreter did not load my JARS, so it is important to set the SPARK_HOME to a spark installation (at least 3.1.2). So firstly:

Loading newly compiled JARs

To load JARs which was newly compiled it is necessary to restart the Tomcat. Restarting Spark interpreter does not suffice. So to load new code from JARs there are the following ways:

See also: https://stackoverflow.com/questions/40550011/zeppelin-how-to-restart-sparkcontext-in-zeppelin

Dependency helium-dev is necessary to compile zeppelin-examples

To compile helium applications (for example those, which are contained in zeppelin-examples) the dependency helium-dev is necessary, which is not saved in the remote apache repository. So to get it, first compile and install it to the local maven repo:

./mvnw clean install -Phelium-dev -DskipTests

After that the package should be in your local repo.

Enable configurations made in files lying in ''conf'' directory

Configurations made for example in conf/zeppelin-site.xml (conf/shiro.ini too?) will be not loaded by default. It is necessary to set environment variable ZEPPELIN_HOME. In the case of my development environment at home:

ZEPPELIN_HOME=/mnt/sda4/development/workspaces.zeppelin/zeppelin

After that Zeppelin will load configuration files from ${ZEPPELIN_HOME}/conf.

Misc

Useful commands

export ZEPPELIN_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
export ZEPPELIN_INTP_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=6006"