You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/06/11 01:43:37 UTC

svn commit: r1747836 - in /zeppelin/site/docs/0.6.0-SNAPSHOT: ./ assets/themes/zeppelin/img/docs-img/ interpreter/ security/

Author: moon
Date: Sat Jun 11 01:43:37 2016
New Revision: 1747836

URL: http://svn.apache.org/viewvc?rev=1747836&view=rev
Log:
ZEPPELIN-901 Cassandra Interpreter V3

Removed:
    zeppelin/site/docs/0.6.0-SNAPSHOT/assets/themes/zeppelin/img/docs-img/cassandra-InterpreterName.png
    zeppelin/site/docs/0.6.0-SNAPSHOT/assets/themes/zeppelin/img/docs-img/cassandra-NewInterpreterInList.png
    zeppelin/site/docs/0.6.0-SNAPSHOT/assets/themes/zeppelin/img/docs-img/cassandra-NewInterpreterInstance.png
    zeppelin/site/docs/0.6.0-SNAPSHOT/security/overview.html
Modified:
    zeppelin/site/docs/0.6.0-SNAPSHOT/atom.xml
    zeppelin/site/docs/0.6.0-SNAPSHOT/interpreter/cassandra.html
    zeppelin/site/docs/0.6.0-SNAPSHOT/rss.xml

Modified: zeppelin/site/docs/0.6.0-SNAPSHOT/atom.xml
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.6.0-SNAPSHOT/atom.xml?rev=1747836&r1=1747835&r2=1747836&view=diff
==============================================================================
--- zeppelin/site/docs/0.6.0-SNAPSHOT/atom.xml (original)
+++ zeppelin/site/docs/0.6.0-SNAPSHOT/atom.xml Sat Jun 11 01:43:37 2016
@@ -4,7 +4,7 @@
  <title>Apache Zeppelin</title>
  <link href="http://zeppelin.apache.org/" rel="self"/>
  <link href="http://zeppelin.apache.org"/>
- <updated>2016-06-10T09:25:10-07:00</updated>
+ <updated>2016-06-10T18:43:49-07:00</updated>
  <id>http://zeppelin.apache.org</id>
  <author>
    <name>The Apache Software Foundation</name>

Modified: zeppelin/site/docs/0.6.0-SNAPSHOT/interpreter/cassandra.html
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.6.0-SNAPSHOT/interpreter/cassandra.html?rev=1747836&r1=1747835&r2=1747836&view=diff
==============================================================================
--- zeppelin/site/docs/0.6.0-SNAPSHOT/interpreter/cassandra.html (original)
+++ zeppelin/site/docs/0.6.0-SNAPSHOT/interpreter/cassandra.html Sat Jun 11 01:43:37 2016
@@ -253,6 +253,7 @@
 <li>@timestamp</li>
 <li>@retryPolicy</li>
 <li>@fetchSize</li>
+<li>@requestTimeOut</li>
 </ol>
 
 <p>Multi-line statements as well as multiple statements on the same line are also supported as long as they are separated by a semi-colon. Ex:</p>
@@ -288,6 +289,15 @@
      <th>Documentation Link</th>
    </tr>
    <tr>
+     <td><strong>3.x</strong></td>
+     <td>
+        <a target="_blank"
+          href="http://docs.datastax.com/en/cql/3.3/cql/cqlIntro.html">
+          http://docs.datastax.com/en/cql/3.3/cql/cqlIntro.html
+        </a>
+     </td>
+   </tr><br>
+   <tr>
      <td><strong>2.2</strong></td>
      <td>
         <a target="_blank"
@@ -471,6 +481,11 @@ There is a drop-down menu on the top lef
      <td><strong>@fetchSize=<em>integer value</em></strong></td>
      <td>Apply the given fetch size to all queries in the paragraph</td>
    </tr>
+   <tr>
+     <td nowrap>Request Time Out</td>
+     <td><strong>@requestTimeOut=<em>integer value</em></strong></td>
+     <td>Apply the given request timeout <strong>in millisecs</strong> to all queries in the paragraph</td>
+   </tr><br>
  </table>
 </center></p>
 
@@ -516,19 +531,19 @@ There is a drop-down menu on the top lef
 <span class="p">);</span>
 <span class="k">TRUNCATE</span> <span class="n">spark_demo</span><span class="p">.</span><span class="n">ts</span><span class="p">;</span>
 
-<span class="o">#</span> <span class="k">Timestamp</span> <span class="k">in</span> <span class="n">the</span> <span class="n">past</span>
+<span class="o">//</span> <span class="k">Timestamp</span> <span class="k">in</span> <span class="n">the</span> <span class="n">past</span>
 <span class="o">@</span><span class="k">timestamp</span><span class="o">=</span><span class="mi">10</span>
 
-<span class="o">#</span> <span class="k">Force</span> <span class="k">timestamp</span> <span class="n">directly</span> <span class="k">in</span> <span class="n">the</span> <span class="k">first</span> <span class="k">insert</span>
+<span class="o">//</span> <span class="k">Force</span> <span class="k">timestamp</span> <span class="n">directly</span> <span class="k">in</span> <span class="n">the</span> <span class="k">first</span> <span class="k">insert</span>
 <span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">spark_demo</span><span class="p">.</span><span class="n">ts</span><span class="p">(</span><span class="k">key</span><span class="p">,</span><span class="n">value</span><span class="p">)</span> <span class="k">VALUES</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="s1">&#39;first insert&#39;</span><span class="p">)</span> <span class="k">USING</span> <span class="k">TIMESTAMP</span> <span class="mi">100</span><span class="p">;</span>
 
-<span class="o">#</span> <span class="k">Select</span> <span class="k">some</span> <span class="k">data</span> <span class="k">to</span> <span class="n">make</span> <span class="n">the</span> <span class="n">clock</span> <span class="n">turn</span>
+<span class="o">//</span> <span class="k">Select</span> <span class="k">some</span> <span class="k">data</span> <span class="k">to</span> <span class="n">make</span> <span class="n">the</span> <span class="n">clock</span> <span class="n">turn</span>
 <span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="n">spark_demo</span><span class="p">.</span><span class="n">albums</span> <span class="k">LIMIT</span> <span class="mi">100</span><span class="p">;</span>
 
-<span class="o">#</span> <span class="n">Now</span> <span class="k">insert</span> <span class="k">using</span> <span class="n">the</span> <span class="k">timestamp</span> <span class="k">parameter</span> <span class="k">set</span> <span class="k">at</span> <span class="n">the</span> <span class="n">beginning</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
+<span class="o">//</span> <span class="n">Now</span> <span class="k">insert</span> <span class="k">using</span> <span class="n">the</span> <span class="k">timestamp</span> <span class="k">parameter</span> <span class="k">set</span> <span class="k">at</span> <span class="n">the</span> <span class="n">beginning</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
 <span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">spark_demo</span><span class="p">.</span><span class="n">ts</span><span class="p">(</span><span class="k">key</span><span class="p">,</span><span class="n">value</span><span class="p">)</span> <span class="k">VALUES</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="s1">&#39;second insert&#39;</span><span class="p">);</span>
 
-<span class="o">#</span> <span class="k">Check</span> <span class="k">for</span> <span class="n">the</span> <span class="k">result</span><span class="p">.</span> <span class="n">You</span> <span class="n">should</span> <span class="n">see</span> <span class="s1">&#39;first insert&#39;</span>
+<span class="o">//</span> <span class="k">Check</span> <span class="k">for</span> <span class="n">the</span> <span class="k">result</span><span class="p">.</span> <span class="n">You</span> <span class="n">should</span> <span class="n">see</span> <span class="s1">&#39;first insert&#39;</span>
 <span class="k">SELECT</span> <span class="n">value</span> <span class="k">FROM</span> <span class="n">spark_demo</span><span class="p">.</span><span class="n">ts</span> <span class="k">WHERE</span> <span class="k">key</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span>
 </code></pre></div>
 <p>Some remarks about query parameters:</p>
@@ -555,25 +570,25 @@ There is a drop-down menu on the top lef
 </ol>
 
 <p>Example:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">@prepare[statement_name]=...
+<div class="highlight"><pre><code class="text language-text" data-lang="text">@prepare[statement-name]=...
 
-@bind[statement_name]=’text’, 1223, ’2015-07-30 12:00:01’, null, true, [‘list_item1’, ’list_item2’]
+@bind[statement-name]=’text’, 1223, ’2015-07-30 12:00:01’, null, true, [‘list_item1’, ’list_item2’]
 
-@bind[statement_name_with_no_bound_value]
+@bind[statement-name-with-no-bound-value]
 
-@remove_prepare[statement_name]
+@remove_prepare[statement-name]
 </code></pre></div>
 <h4>@prepare</h4>
 
-<p>You can use the syntax <em>&quot;@prepare[statement</em>name]=SELECT ...&quot;_ to create a prepared statement.
-The <em>statement</em>name_ is <strong>mandatory</strong> because the interpreter prepares the given statement with the Java driver and
-saves the generated prepared statement in an <strong>internal hash map</strong>, using the provided <em>statement</em>name_ as search key.</p>
+<p>You can use the syntax <em>&quot;@prepare[statement-name]=SELECT...&quot;</em> to create a prepared statement.
+The <em>statement-name</em> is <strong>mandatory</strong> because the interpreter prepares the given statement with the Java driver and
+saves the generated prepared statement in an <strong>internal hash map</strong>, using the provided <em>statement-name</em> as search key.</p>
 
 <blockquote>
 <p>Please note that this internal prepared statement map is shared with <strong>all notebooks</strong> and <strong>all paragraphs</strong> because
 there is only one instance of the interpreter for Cassandra</p>
 
-<p>If the interpreter encounters <strong>many</strong> @prepare for the <strong>same <em>statement</em>name_ (key)</strong>, only the <strong>first</strong> statement will be taken into account.</p>
+<p>If the interpreter encounters <strong>many</strong> @prepare for the <strong>same <em>statement-name</em> (key)</strong>, only the <strong>first</strong> statement will be taken into account.</p>
 </blockquote>
 
 <p>Example:</p>
@@ -581,8 +596,8 @@ there is only one instance of the interp
 
 @prepare[select]=SELECT * FROM spark_demo.artists LIMIT ?
 </code></pre></div>
-<p>For the above example, the prepared statement is <em>SELECT * FROM spark</em>demo.albums LIMIT ?<em>.
-_SELECT * FROM spark</em>demo.artists LIMIT ?_ is ignored because an entry already exists in the prepared statements map with the key select.</p>
+<p>For the above example, the prepared statement is <code>SELECT * FROM spark_demo.albums LIMIT ?</code>.
+`SELECT * FROM spark_demo.artists LIMIT ? is ignored because an entry already exists in the prepared statements map with the key select.</p>
 
 <p>In the context of <strong>Zeppelin</strong>, a notebook can be scheduled to be executed at regular interval,
 thus it is necessary to <strong>avoid re-preparing many time the same statement (considered an anti-pattern)</strong>.</p>
@@ -626,36 +641,41 @@ thus it is necessary to <strong>avoid re
 <h4>@remove_prepare</h4>
 
 <p>To avoid for a prepared statement to stay forever in the prepared statement map, you can use the
-<strong>@remove<em>prepare[statement</em>name]</strong> syntax to remove it.
+<strong>@remove_prepare[statement-name]</strong> syntax to remove it.
 Removing a non-existing prepared statement yields no error.</p>
 
 <h2>Using Dynamic Forms</h2>
 
-<p>Instead of hard-coding your CQL queries, it is possible to use the mustache syntax ( <strong>{{ }}</strong> ) to inject simple value or multiple choices forms.</p>
+<p>Instead of hard-coding your CQL queries, it is possible to use <strong><a href="http://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/manual/dynamicform.html">Zeppelin dynamic form</a></strong> syntax to inject simple value or multiple choices forms.</p>
+
+<p>The legacy mustache syntax ( <strong>{{ }}</strong> ) to bind input text and select form is still supported but is deprecated and will be removed in future releases.</p>
 
-<p>The syntax for simple parameter is: <strong>{{input_Label=default value}}</strong>. The default value is mandatory because the first time the paragraph is executed,
+<blockquote>
+<p><strong>Legacy</strong>
+The syntax for simple parameter is: <strong>{{input_Label=default value}}</strong>. The default value is mandatory because the first time the paragraph is executed,
 we launch the CQL query before rendering the form so at least one value should be provided.</p>
 
 <p>The syntax for multiple choices parameter is: <strong>{{input_Label=value1 | value2 | … | valueN }}</strong>. By default the first choice is used for CQL query
 the first time the paragraph is executed.</p>
+</blockquote>
 
 <p>Example:</p>
 <div class="highlight"><pre><code class="text language-text" data-lang="text">#Secondary index on performer style
 SELECT name, country, performer
 FROM spark_demo.performers
-WHERE name=&#39;{{performer=Sheryl Crow|Doof|Fanfarlo|Los Paranoia}}&#39;
-AND styles CONTAINS &#39;{{style=Rock}}&#39;;
+WHERE name=&#39;${performer=Sheryl Crow|Doof|Fanfarlo|Los Paranoia}&#39;
+AND styles CONTAINS &#39;${style=Rock}&#39;;
 </code></pre></div>
 <p>In the above example, the first CQL query will be executed for <em>performer=&#39;Sheryl Crow&#39; AND style=&#39;Rock&#39;</em>.
 For subsequent queries, you can change the value directly using the form.</p>
 
 <blockquote>
-<p>Please note that we enclosed the <strong>{{ }}</strong> block between simple quotes ( <strong>&#39;</strong> ) because Cassandra expects a String here.
-We could have also use the <strong>{{style=&#39;Rock&#39;}}</strong> syntax but this time, the value displayed on the form is <strong><em>&#39;Rock&#39;</em></strong> and not <strong><em>Rock</em></strong>.</p>
+<p>Please note that we enclosed the <strong>${ }</strong> block between simple quotes ( <strong>&#39;</strong> ) because Cassandra expects a String here.
+We could have also use the <strong>${style=&#39;Rock&#39;}</strong> syntax but this time, the value displayed on the form is <strong><em>&#39;Rock&#39;</em></strong> and not <strong><em>Rock</em></strong>.</p>
 </blockquote>
 
 <p>It is also possible to use dynamic forms for <strong>prepared statements</strong>:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">@bind[select]==&#39;{{performer=Sheryl Crow|Doof|Fanfarlo|Los Paranoia}}&#39;, &#39;{{style=Rock}}&#39;
+<div class="highlight"><pre><code class="text language-text" data-lang="text">@bind[select]==&#39;${performer=Sheryl Crow|Doof|Fanfarlo|Los Paranoia}&#39;, &#39;${style=Rock}&#39;
 </code></pre></div>
 <h2>Shared states</h2>
 
@@ -663,39 +683,27 @@ We could have also use the <strong>{{sty
 <em>Asynchronous execution</em> is only possible when it is possible to return a <code>Future</code> value in the <code>InterpreterResult</code>.
 It may be an interesting proposal for the <strong>Zeppelin</strong> project.</p>
 
-<p>Another caveat is that the same <code>com.datastax.driver.core.Session</code> object is used for <strong>all</strong> notebooks and paragraphs.
+<p>Recently, <strong>Zeppelin</strong> allows you to choose the level of isolation for your interpreters (see <strong><a href="http://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/manual/interpreters.html">Interpreter Binding Mode</a></strong> ).</p>
+
+<p>Long story short, you have 3 available bindings:</p>
+
+<ul>
+<li><strong>shared</strong> : <em>same JVM</em> and <em>same Interpreter instance</em> for all notes</li>
+<li><strong>scoped</strong> : <em>same JVM</em> but <em>different Interpreter instances</em>, one for each note</li>
+<li><strong>isolated</strong>: <em>different JVM</em> running a <em>single Interpreter instance</em>, one JVM for each note</li>
+</ul>
+
+<p>Using the <strong>shared</strong> binding, the same <code>com.datastax.driver.core.Session</code> object is used for <strong>all</strong> notes and paragraphs.
 Consequently, if you use the <strong>USE <em>keyspace name</em>;</strong> statement to log into a keyspace, it will change the keyspace for
 <strong>all current users</strong> of the <strong>Cassandra</strong> interpreter because we only create 1 <code>com.datastax.driver.core.Session</code> object
 per instance of <strong>Cassandra</strong> interpreter.</p>
 
 <p>The same remark does apply to the <strong>prepared statement hash map</strong>, it is shared by <strong>all users</strong> using the same instance of <strong>Cassandra</strong> interpreter.</p>
 
-<p>Until <strong>Zeppelin</strong> offers a real multi-users separation, there is a work-around to segregate user environment and states:
-<em>create different <strong>Cassandra</strong> interpreter instances</em></p>
+<p>When using <strong>scoped</strong> binding, in the <em>same JVM</em> <strong>Zeppelin</strong> will create multiple instances of the Cassandra interpreter, thus 
+multiple <code>com.datastax.driver.core.Session</code> objects. <strong>Beware of resource and memory usage using this binding !</strong> </p>
 
-<p>For this, first go to the <strong>Interpreter</strong> menu and click on the <strong>Create</strong> button
-<center>
-  <img src="../assets/themes/zeppelin/img/docs-img/cassandra-NewInterpreterInstance.png" alt="Create Interpreter">
-</center></p>
-
-<p>In the interpreter creation form, put <strong>cass-instance2</strong> as <strong>Name</strong> and select the <strong>cassandra</strong>
-in the interpreter drop-down list
-<center>
-  <img src="../assets/themes/zeppelin/img/docs-img/cassandra-InterpreterName.png" alt="Interpreter Name">
-</center></p>
-
-<p>Click on <strong>Save</strong> to create the new interpreter instance. Now you should be able to see it in the interpreter list.
-<center>
-  <img src="../assets/themes/zeppelin/img/docs-img/cassandra-NewInterpreterInList.png" alt="Interpreter In List">
-</center></p>
-
-<p>Go back to your notebook and click on the <strong>Gear</strong> icon to configure interpreter bindings.
-You should be able to see and select the <strong>cass-instance2</strong> interpreter instance in the available
-interpreter list instead of the standard <strong>cassandra</strong> instance.</p>
-
-<p><center>
-  <img src="../assets/themes/zeppelin/img/docs-img/cassandra-InterpreterInstanceSelection.png" alt="Interpreter Instance Selection">
-</center></p>
+<p>The <strong>isolated</strong> mode is the most extreme and will create as many JVM/<code>com.datastax.driver.core.Session</code> object as there are distinct notes.</p>
 
 <h2>Interpreter Configuration</h2>
 
@@ -830,7 +838,7 @@ to configure the Java driver</p>
    <tr>
      <td>cassandra.protocol.version</td>
      <td>Cassandra binary protocol version</td>
-     <td>3</td>
+     <td>4</td>
    </tr>
    <tr>
      <td>cassandra.query.default.consistency</td>
@@ -907,13 +915,34 @@ to configure the Java driver</p>
 
 <h2>Change Log</h2>
 
-<p><strong>2.0</strong> <em>(Zeppelin 0.6.0-SNAPSHOT)</em> :
-* Update help menu and add changelog
-* Add Support for <strong>User Defined Functions</strong>, <strong>User Defined Aggregates</strong> and <strong>Materialized Views</strong>
-* Upgrade Java driver version to <strong>3.0.0-rc1</strong></p>
+<p><strong>3.0</strong> <em>(Zeppelin 0.6.0-SNAPSHOT)</em> :</p>
 
-<p><strong>1.0</strong> <em>(Zeppelin 0.5.5-incubating)</em> :
-* Initial version</p>
+<ul>
+<li>Update documentation</li>
+<li>Update interactive documentation</li>
+<li>Add support for binary protocol <strong>V4</strong></li>
+<li>Implement new <code>@requestTimeOut</code> runtime option</li>
+<li>Upgrade Java driver version to <strong>3.0.1</strong></li>
+<li>Allow interpreter to add dynamic forms programmatically when using FormType.SIMPLE</li>
+<li>Allow dynamic form using default Zeppelin syntax</li>
+<li>Fixing typo on FallThroughPolicy</li>
+<li>Look for data in AngularObjectRegistry before creating dynamic form</li>
+<li>Add missing support for <code>ALTER</code> statements</li>
+</ul>
+
+<p><strong>2.0</strong> <em>(Zeppelin 0.6.0-SNAPSHOT)</em> :</p>
+
+<ul>
+<li>Update help menu and add changelog</li>
+<li>Add Support for <strong>User Defined Functions</strong>, <strong>User Defined Aggregates</strong> and <strong>Materialized Views</strong></li>
+<li>Upgrade Java driver version to <strong>3.0.0-rc1</strong></li>
+</ul>
+
+<p><strong>1.0</strong> <em>(Zeppelin 0.5.5-incubating)</em> :</p>
+
+<ul>
+<li>Initial version</li>
+</ul>
 
 <h2>Bugs &amp; Contacts</h2>
 

Modified: zeppelin/site/docs/0.6.0-SNAPSHOT/rss.xml
URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.6.0-SNAPSHOT/rss.xml?rev=1747836&r1=1747835&r2=1747836&view=diff
==============================================================================
--- zeppelin/site/docs/0.6.0-SNAPSHOT/rss.xml (original)
+++ zeppelin/site/docs/0.6.0-SNAPSHOT/rss.xml Sat Jun 11 01:43:37 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-06-10T09:25:10-07:00</lastBuildDate>
-        <pubDate>2016-06-10T09:25:10-07:00</pubDate>
+        <lastBuildDate>2016-06-10T18:43:49-07:00</lastBuildDate>
+        <pubDate>2016-06-10T18:43:49-07:00</pubDate>
         <ttl>1800</ttl>