zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cornead...@apache.org
Subject svn commit: r1762851 [2/2] - in /zeppelin/site/docs/0.7.0-SNAPSHOT: ./ assets/themes/zeppelin/img/screenshots/ development/ displaysystem/ install/ interpreter/ manual/ quickstart/ rest-api/ security/ storage/
Date Fri, 30 Sep 2016 03:00:46 GMT
Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-credential.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-credential.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-credential.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-credential.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-interpreter.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-interpreter.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-interpreter.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-interpreter.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-notebook.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-notebook.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-notebook.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/rest-api/rest-notebook.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/rss.xml
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/rss.xml?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/rss.xml (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/rss.xml Fri Sep 30 03:00:45 2016
@@ -5,8 +5,8 @@
         <description>Apache Zeppelin - The Apache Software Foundation</description>
         <link>http://zeppelin.apache.org</link>
         <link>http://zeppelin.apache.org</link>
-        <lastBuildDate>2016-09-29T21:23:46+09:00</lastBuildDate>
-        <pubDate>2016-09-29T21:23:46+09:00</pubDate>
+        <lastBuildDate>2016-09-30T11:52:41+09:00</lastBuildDate>
+        <pubDate>2016-09-30T11:52:41+09:00</pubDate>
         <ttl>1800</ttl>
 
 

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/screenshots.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/screenshots.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/screenshots.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/screenshots.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/search.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/search.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/search.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/search.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/search_data.json
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/search_data.json?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/search_data.json (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/search_data.json Fri Sep 30 03:00:45 2016
@@ -4,7 +4,7 @@
 
     "/atom.xml": {
       "title": "Atom Feed",
-      "content"  : " Apache Zeppelin   2016-09-29T21:23:46+09:00 http://zeppelin.apache.org
   The Apache Software Foundation   dev@zeppelin.apache.org  ",
+      "content"  : " Apache Zeppelin   2016-09-30T11:52:41+09:00 http://zeppelin.apache.org
   The Apache Software Foundation   dev@zeppelin.apache.org  ",
       "url": " /atom.xml",
       "group": "",
       "excerpt": ""
@@ -477,6 +477,17 @@
     
   
 
+    "/quickstart/install_with_flink_and_spark_cluster.html": {
+      "title": "Install Zeppelin with Flink and Spark in cluster mode",
+      "content"  : "&lt;!--Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);you
may not use this file except in compliance with the License.You may obtain a copy of the License
athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to
in writing, softwaredistributed under the License is distributed on an &quot;AS IS&quot;
BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License
for the specific language governing permissions andlimitations under the License.--&gt;This
tutorial is extremely entry-level. It assumes no prior knowledge of Linux, git, or other tools.
If you carefully type what I tell you when I tell you, you should be able to get Zeppelin
running.Installing Zeppelin with Flink and Spark in cluster modeThis tutorial assumes the
user has a machine (real or virtual with a fresh, minimal installation of Ubuntu 14.04.3 Server.Note:
On the size requirements of the Virtual Machine, som
 e users reported trouble when using the default virtual machine sizes, specifically that
the hard drive needed to be at least 16GB- other users did not have this issue.There are many
good tutorials on how to install Ubuntu Server on a virtual box, here is one of themRequired
ProgramsAssuming the minimal install, there are several programs that we will need to install
before Zeppelin, Flink, and Spark.gitopenssh-serverOpenJDK 7Maven 3.1+For git, openssh-server,
and OpenJDK 7 we will be using the apt package manager.gitFrom the command prompt:sudo apt-get
install gitopenssh-serversudo apt-get install openssh-serverOpenJDK 7sudo apt-get install
openjdk-7-jdk openjdk-7-jre-libA note for those using Ubuntu 16.04: To install openjdk-7 on
Ubuntu 16.04, one must add a repository.  Sourcesudo add-apt-repository ppa:openjdk-r/ppasudo
apt-get updatesudo apt-get install openjdk-7-jdk openjdk-7-jre-libMaven 3.1+Zeppelin requires
maven version 3.x.  The version available in the repositories at th
 e time of writing is 2.x, so maven must be installed manually.Purge any existing versions
of maven.sudo apt-get purge maven maven2Download the maven 3.3.9 binary.wget &amp;quot;http://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz&amp;quot;Unarchive
the binary and move to the /usr/local directory.tar -zxvf apache-maven-3.3.9-bin.tar.gzsudo
mv ./apache-maven-3.3.9 /usr/localCreate symbolic links in /usr/bin.sudo ln -s /usr/local/apache-maven-3.3.9/bin/mvn
/usr/bin/mvnInstalling ZeppelinThis provides a quick overview of Zeppelin installation from
source, however the reader is encouraged to review the Zeppelin Installation GuideFrom the
command prompt:Clone Zeppelin.git clone https://github.com/apache/zeppelin.gitEnter the Zeppelin
root directory.cd zeppelinPackage Zeppelin.mvn clean package -DskipTests -Pspark-1.6 -Dflink.version=1.1.2-DskipTests
skips build tests- you&amp;#39;re not developing (yet), so you don&amp;#39;t need
to do tests, the clone 
 version should build.-Pspark-1.6 tells maven to build a Zeppelin with Spark 1.6.  This is
important because Zeppelin has its own Spark interpreter and the versions must be the same.-Dflink.version=1.1.2
tells maven specifically to build Zeppelin with Flink version 1.1.2.Note: You may wish to
include additional build flags such as -Ppyspark or -Psparkr.  See the build section of github
for more details.Note: You can build against any version of Spark that has a Zeppelin build
profile available. The key is to make sure you check out the matching version of Spark to
build. At the time of this writing, Spark 1.6 was the most recent Spark version available.Note:
On build failures. Having installed Zeppelin close to 30 times now, I will tell you that sometimes
the build fails for seemingly no reason.As long as you didn&amp;#39;t edit any code, it
is unlikely the build is failing because of something you did. What does tend to happen, is
some dependency that maven is trying to download is 
 unreachable.  If your build fails on this step here are some tips:- Don&amp;#39;t get
discouraged.- Scroll up and read through the logs. There will be clues there.- Retry (that
is, run the mvn clean package -DskipTests -Pspark-1.6 again)- If there were clues that a dependency
couldn&amp;#39;t be downloaded wait a few hours or even days and retry again. Open source
software when compiling is trying to download all of the dependencies it needs, if a server
is off-line there is nothing you can do but wait for it to come back.- Make sure you followed
all of the steps carefully.- Ask the community to help you. Go here and join the user mailing
list. People are there to help you. Make sure to copy and paste the build output (everything
that happened in the console) and include that in your message.Start the Zeppelin daemon.bin/zeppelin-daemon.sh
startUse ifconfig to determine the host machine&amp;#39;s IP address. If you are not familiar
with how to do this, a fairly comprehensive post ca
 n be found here.Open a web-browser on a machine connected to the same network as the host
(or in the host operating system if using a virtual machine).  Navigate to http://yourip:8080,
where yourip is the IP address you found in ifconfig.See the Zeppelin tutorial for basic Zeppelin
usage. It is also advised that you take a moment to check out the tutorial notebook that is
included with each Zeppelin install, and to familiarize yourself with basic notebook functionality.Flink
TestCreate a new notebook named &amp;quot;Flink Test&amp;quot; and copy and paste
the following code.%flink  // let Zeppelin know what interpreter to use.val text = env.fromElements(&amp;quot;In
the time of chimpanzees, I was a monkey&amp;quot;,   // some lines of text to analyze&amp;quot;Butane
in my veins and I&amp;#39;m out to cut the junkie&amp;quot;,&amp;quot;With the
plastic eyeballs, spray paint the vegetables&amp;quot;,&amp;quot;Dog food stalls with
the beefcake pantyhose&amp;quot;,&amp;quot;Kill the hea
 dlights and put it in neutral&amp;quot;,&amp;quot;Stock car flamin&amp;#39; with
a loser in the cruise control&amp;quot;,&amp;quot;Baby&amp;#39;s in Reno with
the Vitamin D&amp;quot;,&amp;quot;Got a couple of couches, sleep on the love seat&amp;quot;,&amp;quot;Someone
came in sayin&amp;#39; I&amp;#39;m insane to complain&amp;quot;,&amp;quot;About
a shotgun wedding and a stain on my shirt&amp;quot;,&amp;quot;Don&amp;#39;t believe
everything that you breathe&amp;quot;,&amp;quot;You get a parking violation and a
maggot on your sleeve&amp;quot;,&amp;quot;So shave your face with some mace in the
dark&amp;quot;,&amp;quot;Savin&amp;#39; all your food stamps and burnin&amp;#39;
down the trailer park&amp;quot;,&amp;quot;Yo, cut it&amp;quot;)/*  The meat and
potatoes:        this tells Flink to iterate through the elements, in this case strings, 
      transform the string to lower case and split the string at white space into individual
words        then finally aggregate the occurrence of e
 ach word.        This creates the count variable which is a list of tuples of the form (word,
occurances)counts.collect().foreach(println(_))  // execute the script and print each element
in the counts list*/val counts = text.flatMap{ _.toLowerCase.split(&amp;quot;W+&amp;quot;)
}.map { (_,1) }.groupBy(0).sum(1)counts.collect().foreach(println(_))  // execute the script
and print each element in the counts listRun the code to make sure the built-in Zeppelin Flink
interpreter is working properly.Spark TestCreate a new notebook named &amp;quot;Spark
Test&amp;quot; and copy and paste the following code.%spark // let Zeppelin know what
interpreter to use.val text = sc.parallelize(List(&amp;quot;In the time of chimpanzees,
I was a monkey&amp;quot;,  // some lines of text to analyze&amp;quot;Butane in my
veins and I&amp;#39;m out to cut the junkie&amp;quot;,&amp;quot;With the plastic
eyeballs, spray paint the vegetables&amp;quot;,&amp;quot;Dog food stalls with the
beefcake pantyhose&amp;qu
 ot;,&amp;quot;Kill the headlights and put it in neutral&amp;quot;,&amp;quot;Stock
car flamin&amp;#39; with a loser in the cruise control&amp;quot;,&amp;quot;Baby&amp;#39;s
in Reno with the Vitamin D&amp;quot;,&amp;quot;Got a couple of couches, sleep on the
love seat&amp;quot;,&amp;quot;Someone came in sayin&amp;#39; I&amp;#39;m insane
to complain&amp;quot;,&amp;quot;About a shotgun wedding and a stain on my shirt&amp;quot;,&amp;quot;Don&amp;#39;t
believe everything that you breathe&amp;quot;,&amp;quot;You get a parking violation
and a maggot on your sleeve&amp;quot;,&amp;quot;So shave your face with some mace
in the dark&amp;quot;,&amp;quot;Savin&amp;#39; all your food stamps and burnin&amp;#39;
down the trailer park&amp;quot;,&amp;quot;Yo, cut it&amp;quot;))/*  The meat and
potatoes:        this tells spark to iterate through the elements, in this case strings, 
      transform the string to lower case and split the string at white space into individual
words        then finally ag
 gregate the occurrence of each word.        This creates the count variable which is a list
of tuples of the form (word, occurances)*/val counts = text.flatMap { _.toLowerCase.split(&amp;quot;W+&amp;quot;)
}                 .map { (_,1) }                 .reduceByKey(_ + _)counts.collect().foreach(println(_))
 // execute the script and print each element in the counts listRun the code to make sure
the built-in Zeppelin Flink interpreter is working properly.Finally, stop the Zeppelin daemon.
 From the command prompt run:bin/zeppelin-daemon.sh stopInstalling ClustersFlink ClusterDownload
BinariesBuilding from source is recommended  where possible, for simplicity in this tutorial
we will download Flink and Spark Binaries.To download the Flink Binary use wgetwget &amp;quot;http://mirror.cogentco.com/pub/apache/flink/flink-1.0.3/flink-1.0.3-bin-hadoop24-scala_2.10.tgz&amp;quot;tar
-xzvf flink-1.0.3-bin-hadoop24-scala_2.10.tgzThis will download Flink 1.0.3, compatible with
Hadoop 2.4.  Yo
 u do not have to install Hadoop for this binary to work, but if you are using Hadoop, please
change 24 to your appropriate version.Start the Flink Cluster.flink-1.0.3/bin/start-cluster.shBuilding
From sourceIf you wish to build Flink from source, the following will be instructive.  Note
that if you have downloaded and used the binary version this should be skipped.  The changing
nature of build tools and versions across platforms makes this section somewhat precarious.
 For example, Java8 and Maven 3.0.3 are recommended for building Flink, which are not recommended
for Zeppelin at the time of writing.  If the user wishes to attempt to build from source,
this section will provide some reference.  If errors are encountered, please contact the Apache
Flink community.See the Flink Installation guide for more detailed instructions.Return to
the directory where you have been downloading, this tutorial assumes that is $HOME. Clone
Flink,  check out release-1.0, and build.cd $HOMEgit clone 
 https://github.com/apache/flink.gitcd flinkgit checkout release-1.0mvn clean install -DskipTestsStart
the Flink Cluster in stand-alone modebuild-target/bin/start-cluster.shEnsure the cluster is
upIn a browser, navigate to http://yourip:8082 to see the Flink Web-UI.  Click on &amp;#39;Task
Managers&amp;#39; in the left navigation bar. Ensure there is at least one Task Manager
present.If no task managers are present, restart the Flink cluster with the following commands:(if
binaries)flink-1.0.3/bin/stop-cluster.shflink-1.0.3/bin/start-cluster.sh(if built from source)build-target/bin/stop-cluster.shbuild-target/bin/start-cluster.shSpark
1.6 ClusterDownload BinariesBuilding from source is recommended  where possible, for simplicity
in this tutorial we will download Flink and Spark Binaries.Using binaries is alsoTo download
the Spark Binary use wgetwget &amp;quot;http://mirrors.koehn.com/apache/spark/spark-1.6.1/spark-1.6.1-bin-hadoop2.4.tgz&amp;quot;tar
-xzvf spark-1.6.1-bin-hadoop2.4.t
 gzmv spark-1.6.1-bin-hadoop4.4 sparkThis will download Spark 1.6.1, compatible with Hadoop
2.4.  You do not have to install Hadoop for this binary to work, but if you are using Hadoop,
please change 2.4 to your appropriate version.Building From sourceSpark is an extraordinarily
large project, which takes considerable time to download and build. It is also prone to build
failures for similar reasons listed in the Flink section.  If the user wishes to attempt to
build from source, this section will provide some reference.  If errors are encountered, please
contact the Apache Spark community.See the Spark Installation guide for more detailed instructions.Return
to the directory where you have been downloading, this tutorial assumes that is $HOME. Clone
Spark, check out branch-1.6, and build.Note: Recall, we&amp;#39;re only checking out 1.6
because it is the most recent Spark for which a Zeppelin profile exists at  the time of writing.
You are free to check out other version, just make 
 sure you build Zeppelin against the correct version of Spark.cd $HOMEClone, check out, and
build Spark version 1.6.x.git clone https://github.com/apache/spark.gitcd sparkgit checkout
branch-1.6mvn clean package -DskipTestsStart the Spark clusterReturn to the $HOME directory.cd
$HOMEStart the Spark cluster in stand alone mode, specifying the webui-port as some port other
than 8080 (the webui-port of Zeppelin).spark/sbin/start-master.sh --webui-port 8082Note: Why
--webui-port 8082? There is a digression toward the end of this document that explains this.Open
a browser and navigate to http://yourip:8082 to ensure the Spark master is running.Toward
the top of the page there will be a URL: spark://yourhost:7077.  Note this URL, the Spark
Master URI, it will be needed in subsequent steps.Start the slave using the URI from the Spark
master WebUI:spark/sbin/start-slave.sh spark://yourhostname:7077Return to the root directory
and start the Zeppelin daemon.cd $HOMEzeppelin/bin/zeppelin-daemon
 .sh startConfigure InterpretersOpen a web browser and go to the Zeppelin web-ui at http://yourip:8080.Now
go back to the Zeppelin web-ui at http://yourip:8080 and this time click on anonymous at the
top right, which will open a drop-down menu, select Interpreters to enter interpreter configuration.In
the Spark section, click the edit button in the top right corner to make the property values
editable (looks like a pencil).The only field that needs to be edited in the Spark interpreter
is the master field. Change this value from local[*] to the URL you used to start the slave,
mine was spark://ubuntu:7077.Click Save to update the parameters, and click OK when it asks
you about restarting the interpreter.Now scroll down to the Flink section. Click the edit
button and change the value of host from local to localhost. Click Save again.Reopen the examples
and execute them again (I.e. you need to click the play button at the top of the screen, or
the button on the paragraph .You should be
  able check the Flink and Spark webuis (at something like http://yourip:8081, http://yourip:8082,
http://yourip:8083) and see that jobs have been run against the clusters.Digression Sorry
to be vague and use terms such as &amp;#39;something like&amp;#39;, but exactly what
web-ui is at what port is going to depend on what order you started things. What is really
going on here is you are pointing your browser at specific ports, namely 8081, 8082, and 8083.
 Flink and Spark all want to put their web-ui on port 8080, but are well behaved and will
take the next port available. Since Zeppelin started first, it will get port 8080.  When Flink
starts (assuming you started Flink first), it will try to bind to port 8080, see that it is
already taken, and go to the next one available, hopefully 8081.  Spark has a webui for the
master and the slave, so when they start they will try to bind to 8080   already taken by
Zeppelin), then 8081 (already taken by Flink&amp;#39;s webui), then 8082. If ev
 erything goes smoothy and you followed the directions precisely, the webuis should be 8081
and 8082.     It is possible to specify the port you want the webui to bind to (at the command
line by passing the --webui-port &amp;lt;port&amp;gt; flag when you start the Flink
and Spark, where &amp;lt;port&amp;gt; is the port     you want to see that webui on.
 You can also set the default webui port of Spark and Flink (and Zeppelin) in the configuration
files, but this is a tutorial for novices and slightly out of scope.Next StepsCheck out the
tutorial for more cool things you can do with your new toy!Join the community, ask questions
and contribute! Every little bit helps.",
+      "url": " /quickstart/install_with_flink_and_spark_cluster.html",
+      "group": "tutorial",
+      "excerpt": "Tutorial is valid for Spark 1.6.x and Flink 1.1.2"
+    }
+    ,
+    
+  
+
     "/quickstart/tutorial.html": {
       "title": "Apache Zeppelin Tutorial",
       "content"  : "&lt;!--Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);you
may not use this file except in compliance with the License.You may obtain a copy of the License
athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to
in writing, softwaredistributed under the License is distributed on an &quot;AS IS&quot;
BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License
for the specific language governing permissions andlimitations under the License.--&gt;Zeppelin
TutorialThis tutorial walks you through some of the fundamental Zeppelin concepts. We will
assume you have already installed Zeppelin. If not, please see here first.Current main backend
processing engine of Zeppelin is Apache Spark. If you&amp;#39;re new to this system, you
might want to start by getting an idea of how it processes data to get the most out of Zeppelin.Tutorial
with Local FileData RefineBefore you start Zep
 pelin tutorial, you will need to download bank.zip. First, to transform csv format data into
RDD of Bank objects, run following script. This will also remove header using filter function.val
bankText = sc.textFile(&amp;quot;yourPath/bank/bank-full.csv&amp;quot;)case class
Bank(age:Integer, job:String, marital : String, education : String, balance : Integer)// split
each line, filter out header (starts with &amp;quot;age&amp;quot;), and map it into
Bank case classval bank = bankText.map(s=&amp;gt;s.split(&amp;quot;;&amp;quot;)).filter(s=&amp;gt;s(0)!=&amp;quot;&amp;quot;age&amp;quot;&amp;quot;).map(
   s=&amp;gt;Bank(s(0).toInt,             s(1).replaceAll(&amp;quot;&amp;quot;&amp;quot;,
&amp;quot;&amp;quot;),            s(2).replaceAll(&amp;quot;&amp;quot;&amp;quot;,
&amp;quot;&amp;quot;),            s(3).replaceAll(&amp;quot;&amp;quot;&amp;quot;,
&amp;quot;&amp;quot;),            s(5).replaceAll(&amp;quot;&amp;quot;&amp;quot;,
&amp;quot;&amp;quot;).toInt        ))// convert to Data
 Frame and create temporal tablebank.toDF().registerTempTable(&amp;quot;bank&amp;quot;)Data
RetrievalSuppose we want to see age distribution from bank. To do this, run:%sql select age,
count(1) from bank where age &amp;lt; 30 group by age order by ageYou can make input box
for setting age condition by replacing 30 with ${maxAge=30}.%sql select age, count(1) from
bank where age &amp;lt; ${maxAge=30} group by age order by ageNow we want to see age distribution
with certain marital status and add combo box to select marital status. Run:%sql select age,
count(1) from bank where marital=&amp;quot;${marital=single,single|divorced|married}&amp;quot;
group by age order by ageTutorial with Streaming DataData RefineSince this tutorial is based
on Twitter&amp;#39;s sample tweet stream, you must configure authentication with a Twitter
account. To do this, take a look at Twitter Credential Setup. After you get API keys, you
should fill out credential related values(apiKey, apiSecret, accessToken,
  accessTokenSecret) with your API keys on following script.This will create a RDD of Tweet
objects and register these stream data as a table:import org.apache.spark.streaming._import
org.apache.spark.streaming.twitter._import org.apache.spark.storage.StorageLevelimport scala.io.Sourceimport
scala.collection.mutable.HashMapimport java.io.Fileimport org.apache.log4j.Loggerimport org.apache.log4j.Levelimport
sys.process.stringSeqToProcess/** Configures the Oauth Credentials for accessing Twitter */def
configureTwitterCredentials(apiKey: String, apiSecret: String, accessToken: String, accessTokenSecret:
String) {  val configs = new HashMap[String, String] ++= Seq(    &amp;quot;apiKey&amp;quot;
-&amp;gt; apiKey, &amp;quot;apiSecret&amp;quot; -&amp;gt; apiSecret, &amp;quot;accessToken&amp;quot;
-&amp;gt; accessToken, &amp;quot;accessTokenSecret&amp;quot; -&amp;gt; accessTokenSecret)
 println(&amp;quot;Configuring Twitter OAuth&amp;quot;)  configs.foreach{ case(key,
value) =&amp;gt;    if 
 (value.trim.isEmpty) {      throw new Exception(&amp;quot;Error setting authentication
- value for &amp;quot; + key + &amp;quot; not set&amp;quot;)    }    val fullKey
= &amp;quot;twitter4j.oauth.&amp;quot; + key.replace(&amp;quot;api&amp;quot;,
&amp;quot;consumer&amp;quot;)    System.setProperty(fullKey, value.trim)    println(&amp;quot;tProperty
&amp;quot; + fullKey + &amp;quot; set as [&amp;quot; + value.trim + &amp;quot;]&amp;quot;)
 }  println()}// Configure Twitter credentialsval apiKey = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;val
apiSecret = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;val
accessToken = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;val
accessTokenSecret = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;configureTwitterCredentials(apiKey,
apiSecret, accessToken, accessTokenSecret)import org.apache.spark.streaming.twitter._val ssc
= new StreamingContext(sc, Seconds(2))val tweets = TwitterUt
 ils.createStream(ssc, None)val twt = tweets.window(Seconds(60))case class Tweet(createdAt:Long,
text:String)twt.map(status=&amp;gt;  Tweet(status.getCreatedAt().getTime()/1000, status.getText())).foreachRDD(rdd=&amp;gt;
 // Below line works only in spark 1.3.0.  // For spark 1.1.x and spark 1.2.x,  // use rdd.registerTempTable(&amp;quot;tweets&amp;quot;)
instead.  rdd.toDF().registerAsTable(&amp;quot;tweets&amp;quot;))twt.printssc.start()Data
RetrievalFor each following script, every time you click run button you will see different
result since it is based on real-time data.Let&amp;#39;s begin by extracting maximum 10
tweets which contain the word girl.%sql select * from tweets where text like &amp;#39;%girl%&amp;#39;
limit 10This time suppose we want to see how many tweets have been created per sec during
last 60 sec. To do this, run:%sql select createdAt, count(1) from tweets group by createdAt
order by createdAtYou can make user-defined function and use it in Spark SQL. Let&amp;#
 39;s try it by making function named sentiment. This function will return one of the three
attitudes( positive, negative, neutral ) towards the parameter.def sentiment(s:String) : String
= {    val positive = Array(&amp;quot;like&amp;quot;, &amp;quot;love&amp;quot;,
&amp;quot;good&amp;quot;, &amp;quot;great&amp;quot;, &amp;quot;happy&amp;quot;,
&amp;quot;cool&amp;quot;, &amp;quot;the&amp;quot;, &amp;quot;one&amp;quot;,
&amp;quot;that&amp;quot;)    val negative = Array(&amp;quot;hate&amp;quot;,
&amp;quot;bad&amp;quot;, &amp;quot;stupid&amp;quot;, &amp;quot;is&amp;quot;)
   var st = 0;    val words = s.split(&amp;quot; &amp;quot;)        positive.foreach(p
=&amp;gt;        words.foreach(w =&amp;gt;            if(p==w) st = st+1        )
   )    negative.foreach(p=&amp;gt;        words.foreach(w=&amp;gt;            if(p==w)
st = st-1        )    )    if(st&amp;gt;0)        &amp;quot;positivie&amp;quot;
   else if(st&amp;lt;0)        &amp;quot;negative&amp;quot;    else        &amp;quot
 ;neutral&amp;quot;}// Below line works only in spark 1.3.0.// For spark 1.1.x and spark
1.2.x,// use sqlc.registerFunction(&amp;quot;sentiment&amp;quot;, sentiment _) instead.sqlc.udf.register(&amp;quot;sentiment&amp;quot;,
sentiment _)To check how people think about girls using sentiment function we&amp;#39;ve
made above, run this:%sql select sentiment(text), count(1) from tweets where text like &amp;#39;%girl%&amp;#39;
group by sentiment(text)",
@@ -534,7 +545,7 @@
 
     "/rss.xml": {
       "title": "RSS Feed",
-      "content"  : "        Apache Zeppelin        Apache Zeppelin - The Apache Software
Foundation        http://zeppelin.apache.org        http://zeppelin.apache.org        2016-09-29T21:23:46+09:00
       2016-09-29T21:23:46+09:00        1800",
+      "content"  : "        Apache Zeppelin        Apache Zeppelin - The Apache Software
Foundation        http://zeppelin.apache.org        http://zeppelin.apache.org        2016-09-30T11:52:41+09:00
       2016-09-30T11:52:41+09:00        1800",
       "url": " /rss.xml",
       "group": "",
       "excerpt": ""

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/security/authentication.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/security/authentication.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/security/authentication.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/security/authentication.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/security/datasource_authorization.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/security/datasource_authorization.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/security/datasource_authorization.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/security/datasource_authorization.html Fri Sep 30 03:00:45
2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/security/notebook_authorization.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/security/notebook_authorization.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/security/notebook_authorization.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/security/notebook_authorization.html Fri Sep 30 03:00:45
2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/security/shiroauthentication.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/security/shiroauthentication.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/security/shiroauthentication.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/security/shiroauthentication.html Fri Sep 30 03:00:45
2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/sitemap.txt
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/sitemap.txt?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/sitemap.txt (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/sitemap.txt Fri Sep 30 03:00:45 2016
@@ -45,6 +45,7 @@ http://zeppelin.apache.org/manual/notebo
 http://zeppelin.apache.org/manual/publish.html
 http://zeppelin.apache.org/pleasecontribute.html
 http://zeppelin.apache.org/quickstart/explorezeppelinui.html
+http://zeppelin.apache.org/quickstart/install_with_flink_and_spark_cluster.html
 http://zeppelin.apache.org/quickstart/tutorial.html
 http://zeppelin.apache.org/rest-api/rest-configuration.html
 http://zeppelin.apache.org/rest-api/rest-credential.html

Modified: zeppelin/site/docs/0.7.0-SNAPSHOT/storage/storage.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.7.0-SNAPSHOT/storage/storage.html?rev=1762851&r1=1762850&r2=1762851&view=diff
==============================================================================
--- zeppelin/site/docs/0.7.0-SNAPSHOT/storage/storage.html (original)
+++ zeppelin/site/docs/0.7.0-SNAPSHOT/storage/storage.html Fri Sep 30 03:00:45 2016
@@ -80,6 +80,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>More</b><span></li>
                 <li><a href="/docs/0.7.0-SNAPSHOT/install/upgrade.html">Upgrade
Zeppelin Version</a></li>
+                <li><a href="/docs/0.7.0-SNAPSHOT/quickstart/install_with_flink_and_spark_cluster.html">Install
Zeppelin with Flink and Spark Clusters Tutorial</a></li>
               </ul>
             </li>
             <li>



Mime
View raw message