zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r1726359 [12/12] - in /incubator/zeppelin/site/docs/0.5.6-incubating: ./ assets/ assets/themes/ assets/themes/zeppelin/ assets/themes/zeppelin/bootstrap/ assets/themes/zeppelin/bootstrap/css/ assets/themes/zeppelin/bootstrap/fonts/ assets/t...
Date Sat, 23 Jan 2016 08:45:22 GMT
Added: incubator/zeppelin/site/docs/0.5.6-incubating/screenshots.html
URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.5.6-incubating/screenshots.html?rev=1726359&view=auto
==============================================================================
--- incubator/zeppelin/site/docs/0.5.6-incubating/screenshots.html (added)
+++ incubator/zeppelin/site/docs/0.5.6-incubating/screenshots.html Sat Jan 23 08:45:18 2016
@@ -0,0 +1,211 @@
+
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Screenshots</title>
+    <meta name="description" content="">
+    <meta name="author" content="The Apache Software Foundation">
+
+    <!-- Enable responsive viewport -->
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+
+    <!-- Le styles -->
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/bootstrap/css/bootstrap.css" rel="stylesheet">
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/css/style.css?body=1" rel="stylesheet" type="text/css">
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/css/syntax.css" rel="stylesheet"  type="text/css" media="screen" /> 
+    <!-- Le fav and touch icons -->
+    <!-- Update these with your own images
+    <link rel="shortcut icon" href="images/favicon.ico">
+    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
+    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
+    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
+    -->
+
+    <!-- Js -->
+    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
+    <script src="/docs/0.5.6-incubating/assets/themes/zeppelin/bootstrap/js/bootstrap.min.js"></script>
+    <script src="/docs/0.5.6-incubating/assets/themes/zeppelin/js/docs.js"></script>
+
+    <!-- atom & rss feed -->
+    <link href="/docs/0.5.6-incubating/atom.xml" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed">
+    <link href="/docs/0.5.6-incubating/rss.xml" type="application/rss+xml" rel="alternate" title="Sitewide RSS Feed">
+  </head>
+
+  <body>
+    
+        <div id="menu" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/docs/0.5.6-incubating">
+            <img src="/assets/themes/zeppelin/img/zeppelin_logo.png" width="50" alt="I'm zeppelin">
+            <span style="vertical-align:middle">Zeppelin</span>
+            <span style="vertical-align:baseline"><small>(0.5.6-incubating)</small></span>
+          </a>
+        </div>
+        <nav class="navbar-collapse collapse" role="navigation">
+          <ul class="nav navbar-nav">
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Quick Start <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <!-- li><span><b>Overview</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/index.html">Overview</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Install</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/install/install.html">Install</a></li>
+                <li><a href="/docs/0.5.6-incubating/install/yarn_install.html">YARN Install</a></li>
+                <li><a href="/docs/0.5.6-incubating/install/virtual_machine.html">Virtual Machine Install</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Tutorial</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/tutorial/tutorial.html">Tutorial</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Guide</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/manual/dynamicform.html">Dynamic Form</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Interpreter <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a href="/docs/0.5.6-incubating/manual/interpreters.html">Overview</a></li>
+                <li role="separator" class="divider"></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/cassandra.html">Cassandra</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/elasticsearch.html">Elasticsearch</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/flink.html">Flink</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/geode.html">Geode</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/hive.html">Hive</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/ignite.html">Ignite</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/lens.html">Lens</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/markdown.html">Markdown</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/postgresql.html">Postgresql, hawq</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/scalding.html">Scalding</a></li>
+                <li><a href="/docs/0.5.6-incubating/pleasecontribute.html">Shell</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/spark.html">Spark</a></li>
+                <li><a href="/docs/0.5.6-incubating/pleasecontribute.html">Tajo</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Display System <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a href="/docs/0.5.6-incubating/displaysystem/display.html">Text</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/display.html#html">Html</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/table.html">Table</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/angular.html">Angular</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">More <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <!-- li><span><b>Manual</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/manual/notebookashomepage.html">Notebook as Homepage</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Notebook Storage</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/storage/storage.html#Git">Git Storage</a></li>
+                <li><a href="/docs/0.5.6-incubating/storage/storage.html#S3">S3 Storage</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>REST API</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/rest-api/rest-interpreter.html">Interpreter API</a></li>
+                <li><a href="/docs/0.5.6-incubating/rest-api/rest-notebook.html">Notebook API</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Development</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/development/writingzeppelininterpreter.html">Writing Zeppelin Interpreter</a></li>
+                <li><a href="/docs/0.5.6-incubating/development/howtocontribute.html">How to contribute (code)</a></li>
+                <li><a href="/docs/0.5.6-incubating/development/howtocontributewebsite.html">How to contribute (website)</a></li>
+              </ul>
+            </li>
+          </ul>
+        </nav><!--/.navbar-collapse -->
+      </div>
+    </div>
+
+
+    <div class="container">
+      
+<!--<div class="hero-unit Screenshots">
+  <h1></h1>
+</div>
+-->
+
+<div class="row">
+  <div class="col-md-12">
+    <!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<div class="row">
+     <div class="col-md-3">
+          <a href="assets/themes/zeppelin/img/screenshots/sparksql.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/sparksql.png" /></a>
+          <center>SparkSQL with inline visualization</center>
+     </div>
+     <div class="col-md-3">
+          <a href="assets/themes/zeppelin/img/screenshots/spark.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/spark.png" /></a>
+          <center>Scala code runs with Spark</center>
+     </div>
+     <div class="col-md-3">
+          <a href="assets/themes/zeppelin/img/screenshots/markdown.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/markdown.png" /></a>
+          <center>Markdown supported</center>
+     </div>
+</div>
+
+<p><br />
+<div class="row">
+     <div class="col-md-3">
+          <a href="assets/themes/zeppelin/img/screenshots/notebook.png"><img class="thumbnail" src="assets/themes/zeppelin/img/screenshots/notebook.png" /></a>
+          <center>Notebook</center>
+     </div>
+     <div class="col-md-3">
+     </div>
+     <div class="col-md-3">
+     </div>
+</div></p>
+
+  </div>
+</div>
+
+
+      <hr>
+      <footer>
+        <!-- <p>&copy; 2016 The Apache Software Foundation</p>-->
+      </footer>
+    </div>
+
+    
+
+
+  <script type="text/javascript">
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-45176241-5', 'zeppelin.incubator.apache.org');
+  ga('require', 'linkid', 'linkid.js');
+  ga('send', 'pageview');
+
+</script>
+
+
+
+  </body>
+</html>
+

Added: incubator/zeppelin/site/docs/0.5.6-incubating/sitemap.txt
URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.5.6-incubating/sitemap.txt?rev=1726359&view=auto
==============================================================================
--- incubator/zeppelin/site/docs/0.5.6-incubating/sitemap.txt (added)
+++ incubator/zeppelin/site/docs/0.5.6-incubating/sitemap.txt Sat Jan 23 08:45:18 2016
@@ -0,0 +1,34 @@
+
+http://zeppelin.incubator.apache.org/atom.xml
+http://zeppelin.incubator.apache.org/development/howtocontribute.html
+http://zeppelin.incubator.apache.org/development/howtocontributewebsite.html
+http://zeppelin.incubator.apache.org/development/writingzeppelininterpreter.html
+http://zeppelin.incubator.apache.org/displaysystem/angular.html
+http://zeppelin.incubator.apache.org/displaysystem/display.html
+http://zeppelin.incubator.apache.org/displaysystem/table.html
+http://zeppelin.incubator.apache.org/index.html
+http://zeppelin.incubator.apache.org/install/install.html
+http://zeppelin.incubator.apache.org/install/virtual_machine.html
+http://zeppelin.incubator.apache.org/install/yarn_install.html
+http://zeppelin.incubator.apache.org/interpreter/cassandra.html
+http://zeppelin.incubator.apache.org/interpreter/elasticsearch.html
+http://zeppelin.incubator.apache.org/interpreter/flink.html
+http://zeppelin.incubator.apache.org/interpreter/geode.html
+http://zeppelin.incubator.apache.org/interpreter/hive.html
+http://zeppelin.incubator.apache.org/interpreter/ignite.html
+http://zeppelin.incubator.apache.org/interpreter/lens.html
+http://zeppelin.incubator.apache.org/interpreter/markdown.html
+http://zeppelin.incubator.apache.org/interpreter/postgresql.html
+http://zeppelin.incubator.apache.org/interpreter/scalding.html
+http://zeppelin.incubator.apache.org/interpreter/spark.html
+http://zeppelin.incubator.apache.org/manual/dynamicform.html
+http://zeppelin.incubator.apache.org/manual/interpreters.html
+http://zeppelin.incubator.apache.org/manual/notebookashomepage.html
+http://zeppelin.incubator.apache.org/pleasecontribute.html
+http://zeppelin.incubator.apache.org/rest-api/rest-interpreter.html
+http://zeppelin.incubator.apache.org/rest-api/rest-notebook.html
+http://zeppelin.incubator.apache.org/rss.xml
+http://zeppelin.incubator.apache.org/screenshots.html
+http://zeppelin.incubator.apache.org/sitemap.txt
+http://zeppelin.incubator.apache.org/storage/storage.html
+http://zeppelin.incubator.apache.org/tutorial/tutorial.html

Added: incubator/zeppelin/site/docs/0.5.6-incubating/storage/storage.html
URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.5.6-incubating/storage/storage.html?rev=1726359&view=auto
==============================================================================
--- incubator/zeppelin/site/docs/0.5.6-incubating/storage/storage.html (added)
+++ incubator/zeppelin/site/docs/0.5.6-incubating/storage/storage.html Sat Jan 23 08:45:18 2016
@@ -0,0 +1,249 @@
+
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Storage</title>
+    <meta name="description" content="Notebook Storage option for Zeppelin">
+    <meta name="author" content="The Apache Software Foundation">
+
+    <!-- Enable responsive viewport -->
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+
+    <!-- Le styles -->
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/bootstrap/css/bootstrap.css" rel="stylesheet">
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/css/style.css?body=1" rel="stylesheet" type="text/css">
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/css/syntax.css" rel="stylesheet"  type="text/css" media="screen" /> 
+    <!-- Le fav and touch icons -->
+    <!-- Update these with your own images
+    <link rel="shortcut icon" href="images/favicon.ico">
+    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
+    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
+    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
+    -->
+
+    <!-- Js -->
+    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
+    <script src="/docs/0.5.6-incubating/assets/themes/zeppelin/bootstrap/js/bootstrap.min.js"></script>
+    <script src="/docs/0.5.6-incubating/assets/themes/zeppelin/js/docs.js"></script>
+
+    <!-- atom & rss feed -->
+    <link href="/docs/0.5.6-incubating/atom.xml" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed">
+    <link href="/docs/0.5.6-incubating/rss.xml" type="application/rss+xml" rel="alternate" title="Sitewide RSS Feed">
+  </head>
+
+  <body>
+    
+        <div id="menu" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/docs/0.5.6-incubating">
+            <img src="/assets/themes/zeppelin/img/zeppelin_logo.png" width="50" alt="I'm zeppelin">
+            <span style="vertical-align:middle">Zeppelin</span>
+            <span style="vertical-align:baseline"><small>(0.5.6-incubating)</small></span>
+          </a>
+        </div>
+        <nav class="navbar-collapse collapse" role="navigation">
+          <ul class="nav navbar-nav">
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Quick Start <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <!-- li><span><b>Overview</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/index.html">Overview</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Install</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/install/install.html">Install</a></li>
+                <li><a href="/docs/0.5.6-incubating/install/yarn_install.html">YARN Install</a></li>
+                <li><a href="/docs/0.5.6-incubating/install/virtual_machine.html">Virtual Machine Install</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Tutorial</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/tutorial/tutorial.html">Tutorial</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Guide</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/manual/dynamicform.html">Dynamic Form</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Interpreter <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a href="/docs/0.5.6-incubating/manual/interpreters.html">Overview</a></li>
+                <li role="separator" class="divider"></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/cassandra.html">Cassandra</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/elasticsearch.html">Elasticsearch</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/flink.html">Flink</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/geode.html">Geode</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/hive.html">Hive</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/ignite.html">Ignite</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/lens.html">Lens</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/markdown.html">Markdown</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/postgresql.html">Postgresql, hawq</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/scalding.html">Scalding</a></li>
+                <li><a href="/docs/0.5.6-incubating/pleasecontribute.html">Shell</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/spark.html">Spark</a></li>
+                <li><a href="/docs/0.5.6-incubating/pleasecontribute.html">Tajo</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Display System <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a href="/docs/0.5.6-incubating/displaysystem/display.html">Text</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/display.html#html">Html</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/table.html">Table</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/angular.html">Angular</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">More <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <!-- li><span><b>Manual</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/manual/notebookashomepage.html">Notebook as Homepage</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Notebook Storage</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/storage/storage.html#Git">Git Storage</a></li>
+                <li><a href="/docs/0.5.6-incubating/storage/storage.html#S3">S3 Storage</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>REST API</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/rest-api/rest-interpreter.html">Interpreter API</a></li>
+                <li><a href="/docs/0.5.6-incubating/rest-api/rest-notebook.html">Notebook API</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Development</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/development/writingzeppelininterpreter.html">Writing Zeppelin Interpreter</a></li>
+                <li><a href="/docs/0.5.6-incubating/development/howtocontribute.html">How to contribute (code)</a></li>
+                <li><a href="/docs/0.5.6-incubating/development/howtocontributewebsite.html">How to contribute (website)</a></li>
+              </ul>
+            </li>
+          </ul>
+        </nav><!--/.navbar-collapse -->
+      </div>
+    </div>
+
+
+    <div class="container">
+      
+<!--<div class="hero-unit Storage">
+  <h1></h1>
+</div>
+-->
+
+<div class="row">
+  <div class="col-md-12">
+    <!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<h3>Notebook Storage</h3>
+
+<p>Zeppelin has a pluggable notebook storage mechanism controlled by <code>zeppelin.notebook.storage</code> configuration option with multiple implementations.
+There are few Notebook storages avaialble for a use out of the box:
+ - (default) all notes are saved in the notebook folder in your local File System - <code>VFSNotebookRepo</code>
+ - there is also an option to version it using local Git repository - <code>GitNotebookRepo</code>
+ - another option is Amazon S3 service - <code>S3NotebookRepo</code></p>
+
+<p>Multiple storages can be used at the same time by providing a comma-separated list of the calss-names in the confiruration.
+By default, only first two of them will be automatically kept in sync by Zeppelin.</p>
+
+<p></br></p>
+
+<h4>Notebook Storage in local Git repository <a name="Git"></a></h4>
+
+<p>To enable versioning for all your local notebooks though a standard Git repository - uncomment the next property in <code>zeppelin-site.xml</code> in order to use GitNotebookRepo class:</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">&lt;property&gt;
+  &lt;name&gt;zeppelin.notebook.storage&lt;/name&gt;
+  &lt;value&gt;org.apache.zeppelin.notebook.repo.GitNotebookRepo&lt;/value&gt;
+  &lt;description&gt;notebook persistence layer implementation&lt;/description&gt;
+&lt;/property&gt;
+</code></pre></div>
+<p></br></p>
+
+<h4>Notebook Storage in S3  <a name="S3"></a></h4>
+
+<p>For notebook storage in S3 you need the AWS credentials, for this there are three options, the enviroment variable <code>AWS_ACCESS_KEY_ID</code> and <code>AWS_ACCESS_SECRET_KEY</code>,  credentials file in the folder .aws in you home and IAM role for your instance. For complete the need steps is necessary:</p>
+
+<p></br>
+you need the following folder structure on S3</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">bucket_name/
+  username/
+    notebook/
+</code></pre></div>
+<p>set the enviroment variable in the file <strong>zeppelin-env.sh</strong>:</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">export ZEPPELIN_NOTEBOOK_S3_BUCKET = bucket_name
+export ZEPPELIN_NOTEBOOK_S3_USER = username
+</code></pre></div>
+<p>in the file <strong>zeppelin-site.xml</strong> uncommet and complete the next property:</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">&lt;!--If used S3 to storage, it is necessary the following folder structure bucket_name/username/notebook/--&gt;
+&lt;property&gt;
+  &lt;name&gt;zeppelin.notebook.s3.user&lt;/name&gt;
+  &lt;value&gt;username&lt;/value&gt;
+  &lt;description&gt;user name for s3 folder structure&lt;/description&gt;
+&lt;/property&gt;
+&lt;property&gt;
+  &lt;name&gt;zeppelin.notebook.s3.bucket&lt;/name&gt;
+  &lt;value&gt;bucket_name&lt;/value&gt;
+  &lt;description&gt;bucket name for notebook storage&lt;/description&gt;
+&lt;/property&gt;
+</code></pre></div>
+<p>uncomment the next property for use S3NotebookRepo class:</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">&lt;property&gt;
+  &lt;name&gt;zeppelin.notebook.storage&lt;/name&gt;
+  &lt;value&gt;org.apache.zeppelin.notebook.repo.S3NotebookRepo&lt;/value&gt;
+  &lt;description&gt;notebook persistence layer implementation&lt;/description&gt;
+&lt;/property&gt;
+</code></pre></div>
+<p>comment the next property:</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">&lt;property&gt;
+  &lt;name&gt;zeppelin.notebook.storage&lt;/name&gt;
+  &lt;value&gt;org.apache.zeppelin.notebook.repo.VFSNotebookRepo&lt;/value&gt;
+  &lt;description&gt;notebook persistence layer implementation&lt;/description&gt;
+&lt;/property&gt;
+</code></pre></div>
+  </div>
+</div>
+
+
+      <hr>
+      <footer>
+        <!-- <p>&copy; 2016 The Apache Software Foundation</p>-->
+      </footer>
+    </div>
+
+    
+
+
+  <script type="text/javascript">
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-45176241-5', 'zeppelin.incubator.apache.org');
+  ga('require', 'linkid', 'linkid.js');
+  ga('send', 'pageview');
+
+</script>
+
+
+
+  </body>
+</html>
+

Added: incubator/zeppelin/site/docs/0.5.6-incubating/tutorial/tutorial.html
URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.5.6-incubating/tutorial/tutorial.html?rev=1726359&view=auto
==============================================================================
--- incubator/zeppelin/site/docs/0.5.6-incubating/tutorial/tutorial.html (added)
+++ incubator/zeppelin/site/docs/0.5.6-incubating/tutorial/tutorial.html Sat Jan 23 08:45:18 2016
@@ -0,0 +1,337 @@
+
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Tutorial</title>
+    <meta name="description" content="Tutorial is valid for Spark 1.3 and higher">
+    <meta name="author" content="The Apache Software Foundation">
+
+    <!-- Enable responsive viewport -->
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+
+    <!-- Le styles -->
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/bootstrap/css/bootstrap.css" rel="stylesheet">
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/css/style.css?body=1" rel="stylesheet" type="text/css">
+    <link href="/docs/0.5.6-incubating/assets/themes/zeppelin/css/syntax.css" rel="stylesheet"  type="text/css" media="screen" /> 
+    <!-- Le fav and touch icons -->
+    <!-- Update these with your own images
+    <link rel="shortcut icon" href="images/favicon.ico">
+    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
+    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
+    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
+    -->
+
+    <!-- Js -->
+    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
+    <script src="/docs/0.5.6-incubating/assets/themes/zeppelin/bootstrap/js/bootstrap.min.js"></script>
+    <script src="/docs/0.5.6-incubating/assets/themes/zeppelin/js/docs.js"></script>
+
+    <!-- atom & rss feed -->
+    <link href="/docs/0.5.6-incubating/atom.xml" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed">
+    <link href="/docs/0.5.6-incubating/rss.xml" type="application/rss+xml" rel="alternate" title="Sitewide RSS Feed">
+  </head>
+
+  <body>
+    
+        <div id="menu" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/docs/0.5.6-incubating">
+            <img src="/assets/themes/zeppelin/img/zeppelin_logo.png" width="50" alt="I'm zeppelin">
+            <span style="vertical-align:middle">Zeppelin</span>
+            <span style="vertical-align:baseline"><small>(0.5.6-incubating)</small></span>
+          </a>
+        </div>
+        <nav class="navbar-collapse collapse" role="navigation">
+          <ul class="nav navbar-nav">
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Quick Start <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <!-- li><span><b>Overview</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/index.html">Overview</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Install</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/install/install.html">Install</a></li>
+                <li><a href="/docs/0.5.6-incubating/install/yarn_install.html">YARN Install</a></li>
+                <li><a href="/docs/0.5.6-incubating/install/virtual_machine.html">Virtual Machine Install</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Tutorial</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/tutorial/tutorial.html">Tutorial</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Guide</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/manual/dynamicform.html">Dynamic Form</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Interpreter <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a href="/docs/0.5.6-incubating/manual/interpreters.html">Overview</a></li>
+                <li role="separator" class="divider"></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/cassandra.html">Cassandra</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/elasticsearch.html">Elasticsearch</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/flink.html">Flink</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/geode.html">Geode</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/hive.html">Hive</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/ignite.html">Ignite</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/lens.html">Lens</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/markdown.html">Markdown</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/postgresql.html">Postgresql, hawq</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/scalding.html">Scalding</a></li>
+                <li><a href="/docs/0.5.6-incubating/pleasecontribute.html">Shell</a></li>
+                <li><a href="/docs/0.5.6-incubating/interpreter/spark.html">Spark</a></li>
+                <li><a href="/docs/0.5.6-incubating/pleasecontribute.html">Tajo</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Display System <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <li><a href="/docs/0.5.6-incubating/displaysystem/display.html">Text</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/display.html#html">Html</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/table.html">Table</a></li>
+                <li><a href="/docs/0.5.6-incubating/displaysystem/angular.html">Angular</a></li>
+              </ul>
+            </li>
+            <li>
+              <a href="#" data-toggle="dropdown" class="dropdown-toggle">More <b class="caret"></b></a>
+              <ul class="dropdown-menu">
+                <!-- li><span><b>Manual</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/manual/notebookashomepage.html">Notebook as Homepage</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Notebook Storage</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/storage/storage.html#Git">Git Storage</a></li>
+                <li><a href="/docs/0.5.6-incubating/storage/storage.html#S3">S3 Storage</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>REST API</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/rest-api/rest-interpreter.html">Interpreter API</a></li>
+                <li><a href="/docs/0.5.6-incubating/rest-api/rest-notebook.html">Notebook API</a></li>
+                <li role="separator" class="divider"></li>
+                <!-- li><span><b>Development</b><span></li -->
+                <li><a href="/docs/0.5.6-incubating/development/writingzeppelininterpreter.html">Writing Zeppelin Interpreter</a></li>
+                <li><a href="/docs/0.5.6-incubating/development/howtocontribute.html">How to contribute (code)</a></li>
+                <li><a href="/docs/0.5.6-incubating/development/howtocontributewebsite.html">How to contribute (website)</a></li>
+              </ul>
+            </li>
+          </ul>
+        </nav><!--/.navbar-collapse -->
+      </div>
+    </div>
+
+
+    <div class="container">
+      
+<!--<div class="hero-unit Tutorial">
+  <h1></h1>
+</div>
+-->
+
+<div class="row">
+  <div class="col-md-12">
+    <!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<h3>Zeppelin Tutorial</h3>
+
+<p>We will assume you have Zeppelin installed already. If that&#39;s not the case, see <a href="../install/install.html">Install</a>.</p>
+
+<p>Zeppelin&#39;s current main backend processing engine is <a href="https://spark.apache.org">Apache Spark</a>. If you&#39;re new to the system, you might want to start by getting an idea of how it processes data to get the most out of Zeppelin.</p>
+
+<p><br /></p>
+
+<h3>Tutorial with Local File</h3>
+
+<h4>Data Refine</h4>
+
+<p>Before you start Zeppelin tutorial, you will need to download <a href="http://archive.ics.uci.edu/ml/machine-learning-databases/00222/bank.zip">bank.zip</a>. </p>
+
+<p>First, to transform data from csv format into RDD of <code>Bank</code> objects, run following script. This will also remove header using <code>filter</code> function.</p>
+<div class="highlight"><pre><code class="scala language-scala" data-lang="scala"><span class="k">val</span> <span class="n">bankText</span> <span class="k">=</span> <span class="n">sc</span><span class="o">.</span><span class="n">textFile</span><span class="o">(</span><span class="s">&quot;yourPath/bank/bank-full.csv&quot;</span><span class="o">)</span>
+
+<span class="k">case</span> <span class="k">class</span> <span class="nc">Bank</span><span class="o">(</span><span class="n">age</span><span class="k">:</span><span class="kt">Integer</span><span class="o">,</span> <span class="n">job</span><span class="k">:</span><span class="kt">String</span><span class="o">,</span> <span class="n">marital</span> <span class="k">:</span> <span class="kt">String</span><span class="o">,</span> <span class="n">education</span> <span class="k">:</span> <span class="kt">String</span><span class="o">,</span> <span class="n">balance</span> <span class="k">:</span> <span class="kt">Integer</span><span class="o">)</span>
+
+<span class="c1">// split each line, filter out header (starts with &quot;age&quot;), and map it into Bank case class  </span>
+<span class="k">val</span> <span class="n">bank</span> <span class="k">=</span> <span class="n">bankText</span><span class="o">.</span><span class="n">map</span><span class="o">(</span><span class="n">s</span><span class="k">=&gt;</span><span class="n">s</span><span class="o">.</span><span class="n">split</span><span class="o">(</span><span class="s">&quot;;&quot;</span><span class="o">)).</span><span class="n">filter</span><span class="o">(</span><span class="n">s</span><span class="k">=&gt;</span><span class="n">s</span><span class="o">(</span><span class="mi">0</span><span class="o">)!=</span><span class="s">&quot;\&quot;age\&quot;&quot;</span><span class="o">).</span><span class="n">map</span><span class="o">(</span>
+    <span class="n">s</span><span class="k">=&gt;</span><span class="nc">Bank</span><span class="o">(</span><span class="n">s</span><span class="o">(</span><span class="mi">0</span><span class="o">).</span><span class="n">toInt</span><span class="o">,</span> 
+            <span class="n">s</span><span class="o">(</span><span class="mi">1</span><span class="o">).</span><span class="n">replaceAll</span><span class="o">(</span><span class="s">&quot;\&quot;&quot;</span><span class="o">,</span> <span class="s">&quot;&quot;</span><span class="o">),</span>
+            <span class="n">s</span><span class="o">(</span><span class="mi">2</span><span class="o">).</span><span class="n">replaceAll</span><span class="o">(</span><span class="s">&quot;\&quot;&quot;</span><span class="o">,</span> <span class="s">&quot;&quot;</span><span class="o">),</span>
+            <span class="n">s</span><span class="o">(</span><span class="mi">3</span><span class="o">).</span><span class="n">replaceAll</span><span class="o">(</span><span class="s">&quot;\&quot;&quot;</span><span class="o">,</span> <span class="s">&quot;&quot;</span><span class="o">),</span>
+            <span class="n">s</span><span class="o">(</span><span class="mi">5</span><span class="o">).</span><span class="n">replaceAll</span><span class="o">(</span><span class="s">&quot;\&quot;&quot;</span><span class="o">,</span> <span class="s">&quot;&quot;</span><span class="o">).</span><span class="n">toInt</span>
+        <span class="o">)</span>
+<span class="o">)</span>
+
+<span class="c1">// convert to DataFrame and create temporal table</span>
+<span class="n">bank</span><span class="o">.</span><span class="n">toDF</span><span class="o">().</span><span class="n">registerTempTable</span><span class="o">(</span><span class="s">&quot;bank&quot;</span><span class="o">)</span>
+</code></pre></div>
+<p><br /></p>
+
+<h4>Data Retrieval</h4>
+
+<p>Suppose we want to see age distribution from <code>bank</code>. To do this, run:</p>
+<div class="highlight"><pre><code class="sql language-sql" data-lang="sql"><span class="o">%</span><span class="k">sql</span> <span class="k">select</span> <span class="n">age</span><span class="p">,</span> <span class="k">count</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="k">from</span> <span class="n">bank</span> <span class="k">where</span> <span class="n">age</span> <span class="o">&lt;</span> <span class="mi">30</span> <span class="k">group</span> <span class="k">by</span> <span class="n">age</span> <span class="k">order</span> <span class="k">by</span> <span class="n">age</span>
+</code></pre></div>
+<p>You can make input box for setting age condition by replacing <code>30</code> with <code>${maxAge=30}</code>.</p>
+<div class="highlight"><pre><code class="sql language-sql" data-lang="sql"><span class="o">%</span><span class="k">sql</span> <span class="k">select</span> <span class="n">age</span><span class="p">,</span> <span class="k">count</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="k">from</span> <span class="n">bank</span> <span class="k">where</span> <span class="n">age</span> <span class="o">&lt;</span> <span class="err">${</span><span class="n">maxAge</span><span class="o">=</span><span class="mi">30</span><span class="err">}</span> <span class="k">group</span> <span class="k">by</span> <span class="n">age</span> <span class="k">order</span> <span class="k">by</span> <span class="n">age</span>
+</code></pre></div>
+<p>Now we want to see age distribution with certain marital status and add combo box to select marital status. Run:</p>
+<div class="highlight"><pre><code class="sql language-sql" data-lang="sql"><span class="o">%</span><span class="k">sql</span> <span class="k">select</span> <span class="n">age</span><span class="p">,</span> <span class="k">count</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="k">from</span> <span class="n">bank</span> <span class="k">where</span> <span class="n">marital</span><span class="o">=</span><span class="ss">&quot;${marital=single,single|divorced|married}&quot;</span> <span class="k">group</span> <span class="k">by</span> <span class="n">age</span> <span class="k">order</span> <span class="k">by</span> <span class="n">age</span>
+</code></pre></div>
+<p><br /></p>
+
+<h3>Tutorial with Streaming Data</h3>
+
+<h4>Data Refine</h4>
+
+<p>Since this tutorial is based on Twitter&#39;s sample tweet stream, you must configure authentication with a Twitter account. To do this, take a look at <a href="https://databricks-training.s3.amazonaws.com/realtime-processing-with-spark-streaming.html#twitter-credential-setup">Twitter Credential Setup</a>. After you get API keys, you should fill out credential related values(<code>apiKey</code>, <code>apiSecret</code>, <code>accessToken</code>, <code>accessTokenSecret</code>) with your API keys on following script.</p>
+
+<p>This will create a RDD of <code>Tweet</code> objects and register these stream data as a table:</p>
+<div class="highlight"><pre><code class="scala language-scala" data-lang="scala"><span class="k">import</span> <span class="nn">org.apache.spark.streaming._</span>
+<span class="k">import</span> <span class="nn">org.apache.spark.streaming.twitter._</span>
+<span class="k">import</span> <span class="nn">org.apache.spark.storage.StorageLevel</span>
+<span class="k">import</span> <span class="nn">scala.io.Source</span>
+<span class="k">import</span> <span class="nn">scala.collection.mutable.HashMap</span>
+<span class="k">import</span> <span class="nn">java.io.File</span>
+<span class="k">import</span> <span class="nn">org.apache.log4j.Logger</span>
+<span class="k">import</span> <span class="nn">org.apache.log4j.Level</span>
+<span class="k">import</span> <span class="nn">sys.process.stringSeqToProcess</span>
+
+<span class="cm">/** Configures the Oauth Credentials for accessing Twitter */</span>
+<span class="k">def</span> <span class="n">configureTwitterCredentials</span><span class="o">(</span><span class="n">apiKey</span><span class="k">:</span> <span class="kt">String</span><span class="o">,</span> <span class="n">apiSecret</span><span class="k">:</span> <span class="kt">String</span><span class="o">,</span> <span class="n">accessToken</span><span class="k">:</span> <span class="kt">String</span><span class="o">,</span> <span class="n">accessTokenSecret</span><span class="k">:</span> <span class="kt">String</span><span class="o">)</span> <span class="o">{</span>
+  <span class="k">val</span> <span class="n">configs</span> <span class="k">=</span> <span class="k">new</span> <span class="nc">HashMap</span><span class="o">[</span><span class="kt">String</span>, <span class="kt">String</span><span class="o">]</span> <span class="o">++=</span> <span class="nc">Seq</span><span class="o">(</span>
+    <span class="s">&quot;apiKey&quot;</span> <span class="o">-&gt;</span> <span class="n">apiKey</span><span class="o">,</span> <span class="s">&quot;apiSecret&quot;</span> <span class="o">-&gt;</span> <span class="n">apiSecret</span><span class="o">,</span> <span class="s">&quot;accessToken&quot;</span> <span class="o">-&gt;</span> <span class="n">accessToken</span><span class="o">,</span> <span class="s">&quot;accessTokenSecret&quot;</span> <span class="o">-&gt;</span> <span class="n">accessTokenSecret</span><span class="o">)</span>
+  <span class="n">println</span><span class="o">(</span><span class="s">&quot;Configuring Twitter OAuth&quot;</span><span class="o">)</span>
+  <span class="n">configs</span><span class="o">.</span><span class="n">foreach</span><span class="o">{</span> <span class="k">case</span><span class="o">(</span><span class="n">key</span><span class="o">,</span> <span class="n">value</span><span class="o">)</span> <span class="k">=&gt;</span>
+    <span class="k">if</span> <span class="o">(</span><span class="n">value</span><span class="o">.</span><span class="n">trim</span><span class="o">.</span><span class="n">isEmpty</span><span class="o">)</span> <span class="o">{</span>
+      <span class="k">throw</span> <span class="k">new</span> <span class="nc">Exception</span><span class="o">(</span><span class="s">&quot;Error setting authentication - value for &quot;</span> <span class="o">+</span> <span class="n">key</span> <span class="o">+</span> <span class="s">&quot; not set&quot;</span><span class="o">)</span>
+    <span class="o">}</span>
+    <span class="k">val</span> <span class="n">fullKey</span> <span class="k">=</span> <span class="s">&quot;twitter4j.oauth.&quot;</span> <span class="o">+</span> <span class="n">key</span><span class="o">.</span><span class="n">replace</span><span class="o">(</span><span class="s">&quot;api&quot;</span><span class="o">,</span> <span class="s">&quot;consumer&quot;</span><span class="o">)</span>
+    <span class="nc">System</span><span class="o">.</span><span class="n">setProperty</span><span class="o">(</span><span class="n">fullKey</span><span class="o">,</span> <span class="n">value</span><span class="o">.</span><span class="n">trim</span><span class="o">)</span>
+    <span class="n">println</span><span class="o">(</span><span class="s">&quot;\tProperty &quot;</span> <span class="o">+</span> <span class="n">fullKey</span> <span class="o">+</span> <span class="s">&quot; set as [&quot;</span> <span class="o">+</span> <span class="n">value</span><span class="o">.</span><span class="n">trim</span> <span class="o">+</span> <span class="s">&quot;]&quot;</span><span class="o">)</span>
+  <span class="o">}</span>
+  <span class="n">println</span><span class="o">()</span>
+<span class="o">}</span>
+
+<span class="c1">// Configure Twitter credentials</span>
+<span class="k">val</span> <span class="n">apiKey</span> <span class="k">=</span> <span class="s">&quot;xxxxxxxxxxxxxxxxxxxxxxxxx&quot;</span>
+<span class="k">val</span> <span class="n">apiSecret</span> <span class="k">=</span> <span class="s">&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;</span>
+<span class="k">val</span> <span class="n">accessToken</span> <span class="k">=</span> <span class="s">&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;</span>
+<span class="k">val</span> <span class="n">accessTokenSecret</span> <span class="k">=</span> <span class="s">&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;</span>
+<span class="n">configureTwitterCredentials</span><span class="o">(</span><span class="n">apiKey</span><span class="o">,</span> <span class="n">apiSecret</span><span class="o">,</span> <span class="n">accessToken</span><span class="o">,</span> <span class="n">accessTokenSecret</span><span class="o">)</span>
+
+<span class="k">import</span> <span class="nn">org.apache.spark.streaming.twitter._</span>
+<span class="k">val</span> <span class="n">ssc</span> <span class="k">=</span> <span class="k">new</span> <span class="nc">StreamingContext</span><span class="o">(</span><span class="n">sc</span><span class="o">,</span> <span class="nc">Seconds</span><span class="o">(</span><span class="mi">2</span><span class="o">))</span>
+<span class="k">val</span> <span class="n">tweets</span> <span class="k">=</span> <span class="nc">TwitterUtils</span><span class="o">.</span><span class="n">createStream</span><span class="o">(</span><span class="n">ssc</span><span class="o">,</span> <span class="nc">None</span><span class="o">)</span>
+<span class="k">val</span> <span class="n">twt</span> <span class="k">=</span> <span class="n">tweets</span><span class="o">.</span><span class="n">window</span><span class="o">(</span><span class="nc">Seconds</span><span class="o">(</span><span class="mi">60</span><span class="o">))</span>
+
+<span class="k">case</span> <span class="k">class</span> <span class="nc">Tweet</span><span class="o">(</span><span class="n">createdAt</span><span class="k">:</span><span class="kt">Long</span><span class="o">,</span> <span class="n">text</span><span class="k">:</span><span class="kt">String</span><span class="o">)</span>
+<span class="n">twt</span><span class="o">.</span><span class="n">map</span><span class="o">(</span><span class="n">status</span><span class="k">=&gt;</span>
+  <span class="nc">Tweet</span><span class="o">(</span><span class="n">status</span><span class="o">.</span><span class="n">getCreatedAt</span><span class="o">().</span><span class="n">getTime</span><span class="o">()/</span><span class="mi">1000</span><span class="o">,</span> <span class="n">status</span><span class="o">.</span><span class="n">getText</span><span class="o">())</span>
+<span class="o">).</span><span class="n">foreachRDD</span><span class="o">(</span><span class="n">rdd</span><span class="k">=&gt;</span>
+  <span class="c1">// Below line works only in spark 1.3.0.</span>
+  <span class="c1">// For spark 1.1.x and spark 1.2.x,</span>
+  <span class="c1">// use rdd.registerTempTable(&quot;tweets&quot;) instead.</span>
+  <span class="n">rdd</span><span class="o">.</span><span class="n">toDF</span><span class="o">().</span><span class="n">registerAsTable</span><span class="o">(</span><span class="s">&quot;tweets&quot;</span><span class="o">)</span>
+<span class="o">)</span>
+
+<span class="n">twt</span><span class="o">.</span><span class="n">print</span>
+
+<span class="n">ssc</span><span class="o">.</span><span class="n">start</span><span class="o">()</span>
+</code></pre></div>
+<p><br /></p>
+
+<h4>Data Retrieval</h4>
+
+<p>For each following script, every time you click run button you will see different result since it is based on real-time data.</p>
+
+<p>Let&#39;s begin by extracting maximum 10 tweets which contain the word &quot;girl&quot;.</p>
+<div class="highlight"><pre><code class="sql language-sql" data-lang="sql"><span class="o">%</span><span class="k">sql</span> <span class="k">select</span> <span class="o">*</span> <span class="k">from</span> <span class="n">tweets</span> <span class="k">where</span> <span class="nb">text</span> <span class="k">like</span> <span class="s1">&#39;%girl%&#39;</span> <span class="k">limit</span> <span class="mi">10</span>
+</code></pre></div>
+<p>This time suppose we want to see how many tweets have been created per sec during last 60 sec. To do this, run:</p>
+<div class="highlight"><pre><code class="sql language-sql" data-lang="sql"><span class="o">%</span><span class="k">sql</span> <span class="k">select</span> <span class="n">createdAt</span><span class="p">,</span> <span class="k">count</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="k">from</span> <span class="n">tweets</span> <span class="k">group</span> <span class="k">by</span> <span class="n">createdAt</span> <span class="k">order</span> <span class="k">by</span> <span class="n">createdAt</span>
+</code></pre></div>
+<p>You can make user-defined function and use it in Spark SQL. Let&#39;s try it by making function named <code>sentiment</code>. This function will return one of the three attitudes(positive, negative, neutral) towards the parameter.</p>
+<div class="highlight"><pre><code class="scala language-scala" data-lang="scala"><span class="k">def</span> <span class="n">sentiment</span><span class="o">(</span><span class="n">s</span><span class="k">:</span><span class="kt">String</span><span class="o">)</span> <span class="k">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="o">{</span>
+    <span class="k">val</span> <span class="n">positive</span> <span class="k">=</span> <span class="nc">Array</span><span class="o">(</span><span class="s">&quot;like&quot;</span><span class="o">,</span> <span class="s">&quot;love&quot;</span><span class="o">,</span> <span class="s">&quot;good&quot;</span><span class="o">,</span> <span class="s">&quot;great&quot;</span><span class="o">,</span> <span class="s">&quot;happy&quot;</span><span class="o">,</span> <span class="s">&quot;cool&quot;</span><span class="o">,</span> <span class="s">&quot;the&quot;</span><span class="o">,</span> <span class="s">&quot;one&quot;</span><span class="o">,</span> <span class="s">&quot;that&quot;</span><span class="o">)</span>
+    <span class="k">val</span> <span class="n">negative</span> <span class="k">=</span> <span class="nc">Array</span><span class="o">(</span><span class="s">&quot;hate&quot;</span><span class="o">,</span> <span class="s">&quot;bad&quot;</span><span class="o">,</span> <span class="s">&quot;stupid&quot;</span><span class="o">,</span> <span class="s">&quot;is&quot;</span><span class="o">)</span>
+
+    <span class="k">var</span> <span class="n">st</span> <span class="k">=</span> <span class="mi">0</span><span class="o">;</span>
+
+    <span class="k">val</span> <span class="n">words</span> <span class="k">=</span> <span class="n">s</span><span class="o">.</span><span class="n">split</span><span class="o">(</span><span class="s">&quot; &quot;</span><span class="o">)</span>    
+    <span class="n">positive</span><span class="o">.</span><span class="n">foreach</span><span class="o">(</span><span class="n">p</span> <span class="k">=&gt;</span>
+        <span class="n">words</span><span class="o">.</span><span class="n">foreach</span><span class="o">(</span><span class="n">w</span> <span class="k">=&gt;</span>
+            <span class="k">if</span><span class="o">(</span><span class="n">p</span><span class="o">==</span><span class="n">w</span><span class="o">)</span> <span class="n">st</span> <span class="k">=</span> <span class="n">st</span><span class="o">+</span><span class="mi">1</span>
+        <span class="o">)</span>
+    <span class="o">)</span>
+
+    <span class="n">negative</span><span class="o">.</span><span class="n">foreach</span><span class="o">(</span><span class="n">p</span><span class="k">=&gt;</span>
+        <span class="n">words</span><span class="o">.</span><span class="n">foreach</span><span class="o">(</span><span class="n">w</span><span class="k">=&gt;</span>
+            <span class="k">if</span><span class="o">(</span><span class="n">p</span><span class="o">==</span><span class="n">w</span><span class="o">)</span> <span class="n">st</span> <span class="k">=</span> <span class="n">st</span><span class="o">-</span><span class="mi">1</span>
+        <span class="o">)</span>
+    <span class="o">)</span>
+    <span class="k">if</span><span class="o">(</span><span class="n">st</span><span class="o">&gt;</span><span class="mi">0</span><span class="o">)</span>
+        <span class="s">&quot;positivie&quot;</span>
+    <span class="k">else</span> <span class="k">if</span><span class="o">(</span><span class="n">st</span><span class="o">&lt;</span><span class="mi">0</span><span class="o">)</span>
+        <span class="s">&quot;negative&quot;</span>
+    <span class="k">else</span>
+        <span class="s">&quot;neutral&quot;</span>
+<span class="o">}</span>
+
+<span class="c1">// Below line works only in spark 1.3.0.</span>
+<span class="c1">// For spark 1.1.x and spark 1.2.x,</span>
+<span class="c1">// use sqlc.registerFunction(&quot;sentiment&quot;, sentiment _) instead.</span>
+<span class="n">sqlc</span><span class="o">.</span><span class="n">udf</span><span class="o">.</span><span class="n">register</span><span class="o">(</span><span class="s">&quot;sentiment&quot;</span><span class="o">,</span> <span class="n">sentiment</span> <span class="k">_</span><span class="o">)</span>
+</code></pre></div>
+<p>To check how people think about girls using <code>sentiment</code> function we&#39;ve made above, run this:</p>
+<div class="highlight"><pre><code class="sql language-sql" data-lang="sql"><span class="o">%</span><span class="k">sql</span> <span class="k">select</span> <span class="n">sentiment</span><span class="p">(</span><span class="nb">text</span><span class="p">),</span> <span class="k">count</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="k">from</span> <span class="n">tweets</span> <span class="k">where</span> <span class="nb">text</span> <span class="k">like</span> <span class="s1">&#39;%girl%&#39;</span> <span class="k">group</span> <span class="k">by</span> <span class="n">sentiment</span><span class="p">(</span><span class="nb">text</span><span class="p">)</span>
+</code></pre></div>
+  </div>
+</div>
+
+
+      <hr>
+      <footer>
+        <!-- <p>&copy; 2016 The Apache Software Foundation</p>-->
+      </footer>
+    </div>
+
+    
+
+
+  <script type="text/javascript">
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-45176241-5', 'zeppelin.incubator.apache.org');
+  ga('require', 'linkid', 'linkid.js');
+  ga('send', 'pageview');
+
+</script>
+
+
+
+  </body>
+</html>
+



Mime
View raw message