{"id":4933,"date":"2019-07-15T11:23:22","date_gmt":"2019-07-15T09:23:22","guid":{"rendered":"http:\/\/blog.via-internet.de\/?p=4933"},"modified":"2019-07-15T11:23:22","modified_gmt":"2019-07-15T09:23:22","slug":"apache-zeppelin-getting-started","status":"publish","type":"post","link":"https:\/\/via-internet.de\/blog\/2019\/07\/15\/apache-zeppelin-getting-started\/","title":{"rendered":"Apache Zeppelin | Getting Started"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">First Steps with Zeppelin<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Zeppelin and MySQL<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Create a new Interpreter<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new interpreter<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2302\" height=\"216\" src=\"https:\/\/i0.wp.com\/blog.via-internet.de\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46.png?fit=700%2C66&amp;ssl=1\" alt=\"\" class=\"wp-image-6327\" srcset=\"https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46.png 2302w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46-300x28.png 300w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46-1024x96.png 1024w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46-768x72.png 768w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46-1536x144.png 1536w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.45.46-2048x192.png 2048w\" sizes=\"auto, (max-width: 2302px) 100vw, 2302px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">or confgure existing mysql interpreter<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2300\" height=\"508\" src=\"https:\/\/i0.wp.com\/blog.via-internet.de\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09.png?fit=700%2C155&amp;ssl=1\" alt=\"\" class=\"wp-image-6328\" srcset=\"https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09.png 2300w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09-300x66.png 300w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09-1024x226.png 1024w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09-768x170.png 768w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09-1536x339.png 1536w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.46.09-2048x452.png 2048w\" sizes=\"auto, (max-width: 2300px) 100vw, 2300px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Mysql Interpreter<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Under artifact, add absoulte path of <code>mysql-connector-java-8.0.19.jar<\/code>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add\/modify properties for<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">default.user<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">default.password<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prepare MySQL Database<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a database user spark with password spark<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a database spark wirth all permissions to user spark<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2218\" height=\"1386\" src=\"https:\/\/i2.wp.com\/blog.via-internet.de\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15.png?fit=700%2C437&amp;ssl=1\" alt=\"\" class=\"wp-image-6334\" srcset=\"https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15.png 2218w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15-300x187.png 300w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15-1024x640.png 1024w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15-768x480.png 768w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15-1536x960.png 1536w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.15-2048x1280.png 2048w\" sizes=\"auto, (max-width: 2218px) 100vw, 2218px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Add demo values<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.via-internet.de\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.03.50.png?fit=700%2C296&amp;ssl=1\" alt=\"\" class=\"wp-image-6335\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Test Mysql Conection<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new notebook with mysql interpreter<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1192\" height=\"738\" src=\"https:\/\/i1.wp.com\/blog.via-internet.de\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.50.00.png?fit=700%2C433&amp;ssl=1\" alt=\"\" class=\"wp-image-6330\" srcset=\"https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.50.00.png 1192w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.50.00-300x186.png 300w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.50.00-1024x634.png 1024w, https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-18.50.00-768x475.png 768w\" sizes=\"auto, (max-width: 1192px) 100vw, 1192px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Write sample code<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">select * from spark.demo;<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.via-internet.de\/wp-content\/uploads\/2020\/03\/Bildschirmfoto-2020-03-22-um-19.05.14.png?fit=700%2C131&amp;ssl=1\" alt=\"\" class=\"wp-image-6336\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Installation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install with Docker<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker run -p 8080:8080 \u2014 rm \u2014 name zeppelin apache\/zeppelin:0.8.1<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Set docker volume options to persist notebooks and logs like<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker run -p 8080:8080 \u2014 rm -v $PWD\/logs:\/logs -v $PWD\/notebook:\/notebook -e ZEPPELIN_LOG_DIR=\u2019\/logs\u2019 -e ZEPPELIN_NOTEBOOK_DIR=\u2019\/notebook\u2019 \u2014 name zeppelin apache\/zeppelin:0.8.1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install in a vagrant box<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Setup base Vagrant Box<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vagrant init ubuntu\/trusty64\nvagrant up\nvagrant ssh<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Update Operating System<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get update -y\nsudo apt-get upgrade -y<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-the-vagrant-key\">Install the Vagrant Key<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The only way that all the vagrant commands will be able to communicate over ssh from the host machine to the guest server is if the guest server has this \u201cinsecure vagrant key\u201d installed. It\u2019s called \u201cinsecure\u201d because essentially everyone has this same key and anyone can hack into everyone\u2019s vagrant box if you use it.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir -p \/home\/vagrant\/.ssh\nchmod 0700 \/home\/vagrant\/.ssh\nwget --no-check-certificate \\\n    https:\/\/raw.github.com\/mitchellh\/vagrant\/master\/keys\/vagrant.pub \\\n    -O \/home\/vagrant\/.ssh\/authorized_keys\nchmod 0600 \/home\/vagrant\/.ssh\/authorized_keys\nchown -R vagrant \/home\/vagrant\/.ssh<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install Zeppelin and required Software<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Detailed description can be found <a href=\"https:\/\/zeppelin.apache.org\/docs\/latest\/setup\/basics\/how_to_build.html\">here<\/a>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install -y gcc build-essential linux-headers-server\nsudo apt-get install git\nsudo apt-get install openjdk-7-jdk\nsudo apt-get install npm\nsudo apt-get install libfontconfig\nsudo apt-get install r-base-dev\nsudo apt-get install r-cran-evaluate<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git clone https:\/\/github.com\/apache\/zeppelin.git\nsudo apt-get -y install maven\nmvn clean package -DskipTests -Pspark-2.0 -Phadoop-2.4 -Pr -Pscala-2.11<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configure Zeppelin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First Steps with Zeppelin Zeppelin and MySQL Create a new Interpreter Create a new interpreter or confgure existing mysql interpreter Configure Mysql Interpreter Under artifact, add absoulte path of mysql-connector-java-8.0.19.jar. Add\/modify properties for default.user default.password Prepare MySQL Database Create a database user spark with password spark Create a database spark wirth all permissions to user spark Add demo values Test Mysql Conection Create a new notebook with mysql interpreter Write sample code Installation Install with Docker Set docker volume options to persist notebooks and logs like Install in a vagrant box Setup base Vagrant Box Update Operating System Install the Vagrant [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4937,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,6],"tags":[],"class_list":["post-4933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","category-apache-zeppelin"],"jetpack_featured_media_url":"https:\/\/via-internet.de\/blog\/wp-content\/uploads\/2019\/07\/Bildschirmfoto-2019-07-15-um-11.22.19.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/posts\/4933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/comments?post=4933"}],"version-history":[{"count":0,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/posts\/4933\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/media\/4937"}],"wp:attachment":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/media?parent=4933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/categories?post=4933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/tags?post=4933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}