Author: moon
Date: Sun Oct 25 05:24:48 2015
New Revision: 1710411

URL: http://svn.apache.org/viewvc?rev=1710411&view=rev
Log:
Add lens interpreter doc https://github.com/apache/incubator-zeppelin/pull/360

Added:
    incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/
    
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png
   (with props)
    
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png
   (with props)
    incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-logo.png   
(with props)
    incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-result.png 
  (with props)
    
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-ui-service.png 
  (with props)
    incubator/zeppelin/site/docs/interpreter/lens.html
Modified:
    incubator/zeppelin/site/docs/index.html

Added: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png?rev=1710411&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png?rev=1710411&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-logo.png
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-logo.png?rev=1710411&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-logo.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-result.png
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-result.png?rev=1710411&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-result.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-ui-service.png
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-ui-service.png?rev=1710411&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/zeppelin/site/assets/themes/zeppelin/img/docs-img/lens-ui-service.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/zeppelin/site/docs/index.html
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/index.html?rev=1710411&r1=1710410&r2=1710411&view=diff
==============================================================================
--- incubator/zeppelin/site/docs/index.html (original)
+++ incubator/zeppelin/site/docs/index.html Sun Oct 25 05:24:48 2015
@@ -168,6 +168,10 @@
       
     
   
+    
+      
+    
+  
 
 
 
@@ -281,6 +285,10 @@
   
     
       
+    
+  
+    
+      
        
        <li><a href="/download.html">Download</a></li>
        
@@ -354,7 +362,7 @@
 <li><a href="./interpreter/flink.html">flink</a></li>
 <li><a href="../docs/pleasecontribute.html">hive</a></li>
 <li><a href="../docs/pleasecontribute.html">ignite</a></li>
-<li><a href="../docs/pleasecontribute.html">lens</a></li>
+<li><a href="./interpreter/lens.html">lens</a></li>
 <li><a href="../docs/pleasecontribute.html">md</a></li>
 <li><a href="../docs/pleasecontribute.html">sh</a></li>
 <li><a href="./interpreter/spark.html">spark</a></li>

Added: incubator/zeppelin/site/docs/interpreter/lens.html
URL: 
http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/interpreter/lens.html?rev=1710411&view=auto
==============================================================================
--- incubator/zeppelin/site/docs/interpreter/lens.html (added)
+++ incubator/zeppelin/site/docs/interpreter/lens.html Sun Oct 25 05:24:48 2015
@@ -0,0 +1,501 @@
+
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Lens Interpreter</title>
+    <meta name="description" content="Lens user guide">
+    <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="/assets/themes/zeppelin/bootstrap/css/bootstrap.css" 
rel="stylesheet">
+    <link href="/assets/themes/zeppelin/css/style.css?body=1" rel="stylesheet" 
type="text/css">
+    <link href="/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">
+  -->
+
+    <!-- atom & rss feed -->
+    <link href="/atom.xml" type="application/atom+xml" rel="alternate" 
title="Sitewide ATOM Feed">
+    <link href="/rss.xml" type="application/rss+xml" rel="alternate" 
title="Sitewide RSS Feed">
+  </head>
+
+  <body>
+    
+        <div 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="/">
+            <img src="/assets/themes/zeppelin/img/zeppelin_logo.png" 
width="50" alt="I'm zeppelin">
+            Apache Zeppelin <small>(incubating)</small>
+          </a>
+        </div>
+        <nav class="navbar-collapse collapse" role="navigation">
+          <ul class="nav navbar-nav">
+            
+            
+            
+
+
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+
+
+
+          </ul>
+          <ul class="nav navbar-nav navbar-right">
+            
+            
+            
+
+
+  
+    
+      
+    
+  
+    
+      
+       
+       <li><a href="/community.html">Community</a></li>
+       
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+       
+       <li><a href="/docs/index.html">Docs</a></li>
+       
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+       
+       <li><a href="/download.html">Download</a></li>
+       
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+    
+      
+    
+  
+
+
+
+            <li><a 
href="https://github.com/apache/incubator-zeppelin";>GitHub</a></li>
+            <li id="apache">
+              <a href="#" data-toggle="dropdown" 
class="dropdown-toggle">Apache<b class="caret"></b></a>
+               <ul class="dropdown-menu">
+                <li><a 
href="http://www.apache.org/foundation/how-it-works.html";>Apache Software 
Foundation</a></li>
+                <li><a href="http://www.apache.org/licenses/";>Apache 
License</a></li>
+                <li><a 
href="http://www.apache.org/foundation/sponsorship.html";>Sponsorship</a></li>
+                <li><a 
href="http://www.apache.org/foundation/thanks.html";>Thanks</a></li>
+            </ul>
+            </li>
+          </ul>
+        </nav><!--/.navbar-collapse -->
+      </div>
+    </div>
+
+
+
+
+    <div class="container">
+      
+<!--<div class="hero-unit Lens Interpreter">
+  <h1></h1>
+</div>
+-->
+
+<div class="row">
+  <div class="col-md-12">
+    <h2>Lens Interpreter for Apache Zeppelin</h2>
+
+<h3>Overview</h3>
+
+<p><a href="https://lens.apache.org/";>Apache Lens</a> provides an Unified 
Analytics interface. Lens aims to cut the Data Analytics silos by providing a 
single view of data across multiple tiered data stores and optimal execution 
environment for the analytical query. It seamlessly integrates Hadoop with 
traditional data warehouses to appear like one.</p>
+
+<p><img src="/assets/themes/zeppelin/img/docs-img/lens-logo.png" alt="Apache 
Lens"></p>
+
+<h3>Installing and Running Lens</h3>
+
+<p>In order to use Lens interpreters, you may install Apache Lens in some 
simple steps:</p>
+
+<ol>
+<li>Download Lens for latest version from <a 
href="http://www.apache.org/dyn/closer.lua/lens/2.3-beta";>the ASF</a>. Or the 
older release can be found <a href="http://archive.apache.org/dist/lens/";>in 
the Archives</a>.</li>
+<li>Before running Lens, you have to set HIVE<em>HOME and HADOOP</em>HOME. If 
you want to get more information about this, please refer to <a 
href="http://lens.apache.org/lenshome/install-and-run.html#Installation";>here</a>.
 Lens also provides Pseudo Distributed mode. <a 
href="http://lens.apache.org/lenshome/pseudo-distributed-setup.html";>Lens 
pseudo-distributed setup</a> is done by using <a 
href="https://www.docker.com/";>docker</a>. Hive server and hadoop daemons are 
run as separate processes in lens pseudo-distributed setup. </li>
+<li><p>Now, you can start lens server (or stop).</p>
+<div class="highlight"><pre><code class="text language-text" 
data-lang="text">./bin/lens-ctl start (or stop)
+</code></pre></div></li>
+</ol>
+
+<h3>Configuring Lens Interpreter</h3>
+
+<p>At the &quot;Interpreters&quot; menu, you can to edit Lens interpreter or 
create new one. Zeppelin provides these properties for Lens.</p>
+
+<p><table class="table-configuration">
+  <tr>
+      <th>Property Name</th>
+      <th>value</th>
+      <th>Description</th>
+  </tr>
+  <tr>
+      <td>lens.client.dbname</td>
+      <td>default</td>
+      <td>The database schema name</td>
+  </tr>
+  <tr>
+      <td>lens.query.enable.persistent.resultset</td>
+      <td>false</td>
+      <td>Whether to enable persistent resultset for queries. When enabled, 
server will fetch results from driver, custom format them if any and store in a 
configured location. The file name of query output is queryhandle-id, with 
configured extensions</td>
+  </tr>
+  <tr>
+      <td>lens.server.base.url</td>
+      <td>http://hostname:port/lensapi</td>
+      <td>The base url for the lens server. you have to edit 
&quot;hostname&quot; and &quot;port&quot; that you may use(ex. 
http://0.0.0.0:9999/lensapi)</td>
+   </tr>
+   <tr>
+      <td>lens.session.cluster.user </td>
+      <td>default</td>
+      <td>Hadoop cluster username</td>
+  </tr>
+  <tr>
+      <td>zeppelin.lens.maxResult</td>
+      <td>1000</td>
+      <td>Max number of rows to display</td>
+  </tr>
+  <tr>
+      <td>zeppelin.lens.maxThreads</td>
+      <td>10</td>
+      <td>If concurrency is true then how many threads?</td>
+  </tr>
+  <tr>
+      <td>zeppelin.lens.run.concurrent</td>
+      <td>true</td>
+      <td>Run concurrent Lens Sessions</td>
+  </tr>
+  <tr>
+      <td>xxx</td>
+      <td>yyy</td>
+      <td>anything else from <a 
href="https://lens.apache.org/admin/config-server.html";>Configuring lens 
server</a></td>
+  </tr>
+ </table></p>
+
+<p><img 
src="/assets/themes/zeppelin/img/docs-img/lens-interpreter-setting.png" 
alt="Apache Lens Interpreter Setting"></p>
+
+<h3>Interpreter Bindging for Zeppelin Notebook</h3>
+
+<p>After configuring Lens interpreter, create your own notebook, then you can 
bind interpreters like below image. 
+<img src="/assets/themes/zeppelin/img/docs-img/lens-interpreter-binding.png" 
alt="Zeppelin Notebook Interpreter Biding"></p>
+
+<p>For more interpreter binding information see <a 
href="http://zeppelin.incubator.apache.org/docs/manual/interpreters.html";>here</a>.</p>
+
+<h3>How to use</h3>
+
+<p>You can analyze your data by using <a 
href="http://lens.apache.org/user/olap-cube.html";>OLAP Cube</a> <a 
href="http://lens.apache.org/user/cli.html";>QL</a> which is a high level SQL 
like language to query and describe data sets organized in data cubes. 
+You may experience OLAP Cube like this <a 
href="https://cwiki.apache.org/confluence/display/LENS/2015/07/13/20+Minute+video+demo+of+Apache+Lens+through+examples";>Video
 tutorial</a>. 
+As you can see in this video, they are using Lens Client 
Shell(./bin/lens-cli.sh). All of these functions also can be used on Zeppelin 
by using Lens interpreter.</p>
+
+<p><li> Create and Use(Switch) Databases.</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 create database newDb
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  use newDb
+</code></pre></div>
+<p><li> Create Storage.</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 create storage your/path/to/lens/client/examples/resources/db-storage.xml
+</code></pre></div>
+<p><li> Create Dimensions, Show fields and join-chains of them. </p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 create dimension your/path/to/lens/client/examples/resources/customer.xml
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  dimension show fields customer
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  dimension show joinchains customer
+</code></pre></div>
+<p><li> Create Caches, Show fields and join-chains of them.</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 create cube your/path/to/lens/client/examples/resources/sales-cube.xml 
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  cube show fields sales
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  cube show joinchains sales
+</code></pre></div>
+<p><li> Create Dimtables and Fact. </p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 create dimtable your/path/to/lens/client/examples/resources/customer_table.xml
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  create fact 
your/path/to/lens/client/examples/resources/sales-raw-fact.xml
+</code></pre></div>
+<p><li> Add partitions to Dimtable and Fact.</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 dimtable add single-partition --dimtable_name customer_table --storage_name 
local --path your/path/to/lens/client/examples/resources/customer-local-part.xml
+</code></pre></div><div class="highlight"><pre><code class="text 
language-text" data-lang="text">  fact add partitions --fact_name 
sales_raw_fact --storage_name local --path 
your/path/to/lens/client/examples/resources/sales-raw-local-parts.xml
+</code></pre></div>
+<p><li> Now, you can run queries on cubes.</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text"> 
 query execute cube select customer_city_name, product_details.description, 
product_details.category, product_details.color, store_sales from sales where 
time_range_in(delivery_time, &#39;2015-04-11-00&#39;, &#39;2015-04-13-00&#39;)
+</code></pre></div>
+<p><img src="/assets/themes/zeppelin/img/docs-img/lens-result.png" alt="Lens 
Query Result"></p>
+
+<p>These are just examples that provided in advance by Lens. If you want to 
explore whole tutorials of Lens, see the <a 
href="https://cwiki.apache.org/confluence/display/LENS/2015/07/13/20+Minute+video+demo+of+Apache+Lens+through+examples";>tutorial
 video</a>.</p>
+
+<h3>Lens UI Service</h3>
+
+<p>Lens also provides web UI service. Once the server starts up, you can open 
the service on http://serverhost:19999/index.html and browse. You may also 
check the structure that you made and use query easily here.</p>
+
+<p><img src="/assets/themes/zeppelin/img/docs-img/lens-ui-service.png" 
alt="Lens UI Servive"></p>
+
+  </div>
+</div>
+
+
+      <hr>
+      <footer>
+        <!-- <p>&copy; 2015 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>
+
+
+
+    <script src="https://code.jquery.com/jquery-1.10.2.min.js";></script>
+    
+    <script 
src="/assets/themes/zeppelin/bootstrap/js/bootstrap.min.js"></script>
+  </body>
+</html>
+


Reply via email to