apache_zeppelin
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| apache_zeppelin [2024/04/17 09:06] – [Enable configurations made in files lying in ''conf'' directory] kalaschnikow | apache_zeppelin [2024/05/27 10:12] (current) – kalaschnikow | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Apache Zeppelin ====== | ||
| + | https:// | ||
| + | |||
| + | * https:// | ||
| + | | ||
| + | * [[Apache Zeppelin Documentation]] (my summary of https:// | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | * [[Scala]] -> language used in Zeppelin | ||
| + | ===== Local installation ===== | ||
| + | |||
| + | |||
| + | ==== In Container (Windows at Work) ==== | ||
| + | |||
| + | < | ||
| + | cd C: | ||
| + | docker-compose up -d | ||
| + | </ | ||
| + | |||
| + | === Useful commands in the context of Windows and Docker === | ||
| + | |||
| + | * Create an image (' | ||
| + | < | ||
| + | docker commit zeppelinForDev zeppelin-for-dev: | ||
| + | </ | ||
| + | |||
| + | ==== Directly (Windows at Work) ==== | ||
| + | |||
| + | **CAUTION: | ||
| + | |||
| + | Location: | ||
| + | |||
| + | '' | ||
| + | |||
| + | To start: | ||
| + | < | ||
| + | cd C: | ||
| + | zeppelin.cmd | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Linux at Home ==== | ||
| + | |||
| + | Location: | ||
| + | |||
| + | ''/ | ||
| + | |||
| + | To start as daemon: | ||
| + | < | ||
| + | cd / | ||
| + | ./ | ||
| + | </ | ||
| + | |||
| + | |||
| + | To start interactively: | ||
| + | < | ||
| + | cd / | ||
| + | zeppelin.sh | ||
| + | </ | ||
| + | |||
| + | === Problems occured during installation === | ||
| + | |||
| + | * '' | ||
| + | * For example: | ||
| + | * '' | ||
| + | |||
| + | |||
| + | ==== Git ==== | ||
| + | |||
| + | Origin: '' | ||
| + | ===== Spark interpreter ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | * ... | ||
| + | * set SPARK_HOME | ||
| + | * [[https:// | ||
| + | * Set SPARK_HOME in zeppelin-env.sh | ||
| + | * Set SPARK_HOME in interpreter setting page | ||
| + | * Set SPARK_HOME via inline generic configuration | ||
| + | * For docker container (example): | ||
| + | * < | ||
| + | * ... | ||
| + | * [[https:// | ||
| + | * set the following variables (e.g. through UI -> " | ||
| + | * spark.files | ||
| + | * spark.jars | ||
| + | * spark.jars.packages | ||
| + | * Cache is located under | ||
| + | * at home: ''/ | ||
| + | |||
| + | |||
| + | * Memory problems | ||
| + | * if we use data of one year, memory problems can occur. To solve them set the memory parameters of the Spark interpreter higher. | ||
| + | * On my home computer I've set: | ||
| + | * '' | ||
| + | * '' | ||
| + | * also the heap size of Zeppelin can play a role (but the interpreter parameters seems to be more important) | ||
| + | |||
| + | |||
| + | ===== Debugging Zeppelin notebook paragraphs in IntelliJ ===== | ||
| + | |||
| + | * 1. Set ZEPPELIN_INTP_JAVA_OPTS for zeppelin installation | ||
| + | * This can be done in different ways. Also it depends on your installation (docker or not, Windows or Linux etc). On my docker container (Windows at work) I've set it in '' | ||
| + | <code bash> | ||
| + | -- not wait for debugger (n=> JVM executes the code immediately) | ||
| + | export ZEPPELIN_INTP_JAVA_OPTS=" | ||
| + | -- If you want Java to wait for you to connect before executing the application, | ||
| + | export ZEPPELIN_INTP_JAVA_OPTS=" | ||
| + | </ | ||
| + | * Important for debugging if Zeppelin was started not from Docker, but from IntelliJ: | ||
| + | * in the IntelliJ run configuration set environment variable " | ||
| + | * I don't really know why, but I think, because the Spark interpreter JVM will be started separately, and then ZEPPELIN_INTP_JAVA_OPTS will be used | ||
| + | * 2. open this port in the docker (not necessary if Zeppelin starts not from Docker) | ||
| + | * e.g. with in the docker compose config: | ||
| + | <code yaml> | ||
| + | ports: | ||
| + | - 127.0.0.1: | ||
| + | - 127.0.0.1: | ||
| + | - 127.0.0.1: | ||
| + | - 127.0.0.1: | ||
| + | </ | ||
| + | * 3. add a " | ||
| + | |||
| + | To start a debugging session: | ||
| + | - start Zeppelin (from docker container or directly) | ||
| + | - open browser with the notebook and note which should be debugged | ||
| + | - 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 " | ||
| + | - 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)) | ||
| + | - IntelliJ should stop on the breakpoint | ||
| + | |||
| + | Note: it is not possible to set the value for a variable with F2 key (="Set value" | ||
| + | |||
| + | See also: [[https:// | ||
| + | |||
| + | ===== Running Helium Visualization in development mode ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Prerequisites: | ||
| + | * Yarn should be installed -> | ||
| + | < | ||
| + | sudo npm install --global yarn | ||
| + | </ | ||
| + | * see also : https:// | ||
| + | * '' | ||
| + | * at the moment '' | ||
| + | * the version of Node to use can be changed with: '' | ||
| + | * prerequisite: | ||
| + | So in short: | ||
| + | * start Zeppelin | ||
| + | * it is not very important how it is started | ||
| + | * it works via running main class " | ||
| + | * '' | ||
| + | * start " | ||
| + | < | ||
| + | # Linux at home | ||
| + | cd / | ||
| + | nvm use 16.20.2 | ||
| + | yarn run dev:helium | ||
| + | |||
| + | # all in one | ||
| + | cd / | ||
| + | |||
| + | |||
| + | # Linux at work | ||
| + | cd / | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Display a table for tests ==== | ||
| + | < | ||
| + | %sh echo -e " | ||
| + | </ | ||
| + | ===== 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: | ||
| + | * open terminal session in the zeppelin container | ||
| + | * e.g. '' | ||
| + | * install Spark 3.1.2 in the container environment (!) | ||
| + | * see '' | ||
| + | * set the SPARK_HOME in the " | ||
| + | * Through the web application: | ||
| + | * set path of the Jars in " | ||
| + | * Also on the same page of the web application: | ||
| + | * after that open your " | ||
| + | * e.g. '' | ||
| + | |||
| + | ==== 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: | ||
| + | * restart the Tomcat. (I don't know how to do it at the moment.) | ||
| + | * restart the Spark interpreter. | ||
| + | * simple restart unfortunately does not work, it is necessary to | ||
| + | - change confuguration of '' | ||
| + | - save configuration | ||
| + | - change confuguration of '' | ||
| + | - restart interpreter | ||
| + | * simply to restart the container completely. Maybe it is the quickest solution. | ||
| + | |||
| + | See also: https:// | ||
| + | |||
| + | ==== Dependency helium-dev is necessary to compile zeppelin-examples ==== | ||
| + | To compile helium applications (for example those, which are contained in '' | ||
| + | <code bash> | ||
| + | ./mvnw clean install -Phelium-dev -DskipTests | ||
| + | </ | ||
| + | |||
| + | After that the package should be in your local repo. | ||
| + | |||
| + | ==== Enable configurations made in files lying in '' | ||
| + | |||
| + | Configurations made for example in '' | ||
| + | < | ||
| + | ZEPPELIN_HOME=/ | ||
| + | </ | ||
| + | |||
| + | After that Zeppelin will load configuration files from '' | ||
| + | |||
| + | |||
| + | ===== Misc ===== | ||
| + | |||
| + | ==== Useful commands ==== | ||
| + | * Start container (with name " | ||
| + | * < | ||
| + | * < | ||
| + | * < | ||
| + | * Start container (with name " | ||
| + | * < | ||
| + | * Login as root in the bash of running container | ||
| + | * < | ||
| + | * there are also [[https:// | ||
| + | |||
| + | ==== Some links ==== | ||
| + | |||
| + | * [[https:// | ||
| + | * can be useful in this (=Windows) context: https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | < | ||
| + | export ZEPPELIN_JAVA_OPTS=" | ||
| + | export ZEPPELIN_INTP_JAVA_OPTS=" | ||
| + | </ | ||
| + | |||
| + | * [[https:// | ||
