Modified: incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rest-api/rest-interpreter.html URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rest-api/rest-interpreter.html?rev=1725100&r1=1725099&r2=1725100&view=diff ============================================================================== --- incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rest-api/rest-interpreter.html (original) +++ incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rest-api/rest-interpreter.html Sun Jan 17 16:20:26 2016 @@ -156,28 +156,29 @@ limitations under the License. <p>Zeppelin provides several REST API's for interaction and remote activation of zeppelin functionality.</p> -<p>All REST API are available starting with the following endpoint <code>http://[zeppelin-server]:[zeppelin-port]/api</code></p> +<p>All REST API are available starting with the following endpoint <code>http://[zeppelin-server]:[zeppelin-port]/api</code>. + Note that zeppein REST API receive or return JSON objects, it it recommended you install some JSON view such as + <a href="https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc">JSON View</a>.</p> -<p>Note that zeppein REST API receive or return JSON objects, it it recommended you install some JSON view such as - <a href="https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc">JSONView</a></p> - -<p>If you work with zeppelin and find a need for an additional REST API please <a href="../../community.html">file an issue or send us mail</a> </p> +<p>If you work with zeppelin and find a need for an additional REST API, please <a href="http://zeppelin.incubator.apache.org/community.html">file an issue or send us mail</a>. </p> <p><br /></p> -<h3>Interpreter REST API list</h3> +<h2>Interpreter REST API List</h2> + +<p>The role of registered interpreters, settings and interpreters group are described in <a href="../manual/interpreters.html">here</a>.</p> -<p>The role of registered interpreters, settings and interpreters group is described <a href="../manual/interpreters.html">here</a></p> +<h3>1. List of Registered Interpreters & Interpreter Settings</h3> <p><table class="table-configuration"> <col width="200"> <tr> - <th>List registered interpreters</th> + <th>List of registered interpreters</th> <th></th> </tr> <tr> <td>Description</td> - <td>This <code>GET</code> method return all the registered interpreters available on the server.</td> + <td>This <code>GET</code> method returns all the registered interpreters available on the server.</td> </tr> <tr> <td>URL</td> @@ -188,12 +189,11 @@ limitations under the License. <td>200</td> </tr> <tr> - <td> Fail code</td> + <td>Fail code</td> <td> 500 </td> </tr> <tr> - <td> sample JSON response - </td> + <td>Sample JSON response</td> <td> <pre> { @@ -247,12 +247,12 @@ limitations under the License. <p><table class="table-configuration"> <col width="200"> <tr> - <th>List interpreters settings</th> + <th>List of interpreters settings</th> <th></th> </tr> <tr> <td>Description</td> - <td>This <code>GET</code> method return all the interpreters settings registered on the server.</td> + <td>This <code>GET</code> method returns all the interpreters settings registered on the server.</td> </tr> <tr> <td>URL</td> @@ -263,12 +263,11 @@ limitations under the License. <td>200</td> </tr> <tr> - <td> Fail code</td> + <td>Fail code</td> <td> 500 </td> </tr> <tr> - <td> sample JSON response - </td> + <td>Sample JSON response</td> <td> <pre> { @@ -317,6 +316,8 @@ limitations under the License. <p><br/></p> +<h3>2. Create an Interpreter Setting</h3> + <p><table class="table-configuration"> <col width="200"> <tr> @@ -336,12 +337,11 @@ limitations under the License. <td>201</td> </tr> <tr> - <td> Fail code</td> + <td>Fail code</td> <td> 500 </td> </tr> <tr> - <td> sample JSON input - </td> + <td>Sample JSON input</td> <td> <pre> { @@ -361,8 +361,7 @@ limitations under the License. </td> </tr> <tr> - <td> sample JSON response - </td> + <td>Sample JSON response</td> <td> <pre> { @@ -390,6 +389,8 @@ limitations under the License. <p><br/></p> +<h3>3. Update an Interpreter Setting</h3> + <p><table class="table-configuration"> <col width="200"> <tr> @@ -409,12 +410,11 @@ limitations under the License. <td>200</td> </tr> <tr> - <td> Fail code</td> + <td>Fail code</td> <td> 500 </td> </tr> <tr> - <td> sample JSON input - </td> + <td>Sample JSON input</td> <td> <pre> { @@ -434,8 +434,7 @@ limitations under the License. </td> </tr> <tr> - <td> sample JSON response - </td> + <td>Sample JSON response</td> <td> <pre> { @@ -463,6 +462,8 @@ limitations under the License. <p><br/></p> +<h3>4. Delete an Interpreter Setting</h3> + <p><table class="table-configuration"> <col width="200"> <tr> @@ -486,16 +487,17 @@ limitations under the License. <td> 500 </td> </tr> <tr> - <td> sample JSON response - </td> + <td>Sample JSON response</td> <td> - <pre>{"status":"OK"}</pre> + <code>{"status":"OK"}</code> </td> </tr> </table></p> <p><br/></p> +<h3>5. Restart an Interpreter</h3> + <p><table class="table-configuration"> <col width="200"> <tr> @@ -504,7 +506,7 @@ limitations under the License. </tr> <tr> <td>Description</td> - <td>This <code>PUT</code> method restart the given interpreter id.</td> + <td>This <code>PUT</code> method restarts the given interpreter id.</td> </tr> <tr> <td>URL</td> @@ -515,14 +517,13 @@ limitations under the License. <td>200</td> </tr> <tr> - <td> Fail code</td> + <td>Fail code</td> <td> 500 </td> </tr> <tr> - <td> sample JSON response - </td> + <td>Sample JSON response</td> <td> - <pre>{"status":"OK"}</pre> + <code>{"status":"OK"}</code> </td> </tr> </table></p>
Modified: incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rss.xml URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rss.xml?rev=1725100&r1=1725099&r2=1725100&view=diff ============================================================================== --- incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rss.xml (original) +++ incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/rss.xml Sun Jan 17 16:20:26 2016 @@ -5,8 +5,8 @@ <description>Apache Zeppelin (incubating) - The Apache Software Foundation</description> <link>http://zeppelin.incubator.apache.org</link> <link>http://zeppelin.incubator.apache.org</link> - <lastBuildDate>2016-01-03T08:03:20-08:00</lastBuildDate> - <pubDate>2016-01-03T08:03:20-08:00</pubDate> + <lastBuildDate>2016-01-17T08:21:02-08:00</lastBuildDate> + <pubDate>2016-01-17T08:21:02-08:00</pubDate> <ttl>1800</ttl> Modified: incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/sitemap.txt URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/sitemap.txt?rev=1725100&r1=1725099&r2=1725100&view=diff ============================================================================== --- incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/sitemap.txt (original) +++ incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/sitemap.txt Sun Jan 17 16:20:26 2016 @@ -6,7 +6,6 @@ http://zeppelin.incubator.apache.org/dev 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/docs.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 Modified: incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/tutorial/tutorial.html URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/tutorial/tutorial.html?rev=1725100&r1=1725099&r2=1725100&view=diff ============================================================================== --- incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/tutorial/tutorial.html (original) +++ incubator/zeppelin/site/docs/0.6.0-incubating-SNAPSHOT/tutorial/tutorial.html Sun Jan 17 16:20:26 2016 @@ -152,26 +152,26 @@ See the License for the specific languag limitations under the License. --> -<h3>Zeppelin Tutorial</h3> +<h2>Zeppelin Tutorial</h2> -<p>We will assume you have Zeppelin installed already. If that's not the case, see <a href="../install/install.html">Install</a>.</p> +<p>This tutorial walks you through some of the fundamental Zeppelin concepts. We will assume you have already installed Zeppelin. If not, please see <a href="../install/install.html">here</a> first.</p> -<p>Zeppelin's current main backend processing engine is <a href="https://spark.apache.org">Apache Spark</a>. If you'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>Current main backend processing engine of Zeppelin is <a href="https://spark.apache.org">Apache Spark</a>. If you're new to this system, you might want to start by getting an idea of how it processes data to get the most out of Zeppelin.</p> <p><br /></p> -<h3>Tutorial with Local File</h3> +<h2>Tutorial with Local File</h2> -<h4>Data Refine</h4> +<h3>1. Data Refine</h3> <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> +<p>First, to transform csv format data 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">"yourPath/bank/bank-full.csv"</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 "age"), and map it into Bank case class </span> +<span class="c1">// split each line, filter out header (starts with "age"), 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">=></span><span class="n">s</span><span class="o">.</span><span class="n">split</span><span class="o">(</span><span class="s">";"</span><span class="o">)).</span><span class="n">filter</span><span class="o">(</span><span class="n">s</span><span class="k">=></span><span class="n">s</span><span class="o">(</span><span class="mi">0</span><span class="o">)!=</span><span class="s">"\"age\""</span><span class="o">).</span><span class="n">map</span><span class="o">(</span> <span class="n">s</span><span class="k">=></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">"\""</span><span class="o">,</span> <span class="s">""</span><span class="o">),</span> @@ -184,9 +184,7 @@ limitations under the License. <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">"bank"</span><span class="o">)</span> </code></pre></div> -<p><br /></p> - -<h4>Data Retrieval</h4> +<h3>2. Data Retrieval</h3> <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"><</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> @@ -199,9 +197,9 @@ limitations under the License. </code></pre></div> <p><br /></p> -<h3>Tutorial with Streaming Data</h3> +<h2>Tutorial with Streaming Data</h2> -<h4>Data Refine</h4> +<h3>1. Data Refine</h3> <p>Since this tutorial is based on Twitter'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> @@ -258,19 +256,17 @@ limitations under the License. <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> +<h3>2. Data Retrieval</h3> <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's begin by extracting maximum 10 tweets which contain the word "girl".</p> +<p>Let's begin by extracting maximum 10 tweets which contain the word <strong>girl</strong>.</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">'%girl%'</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'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> +<p>You can make user-defined function and use it in Spark SQL. Let'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">"like"</span><span class="o">,</span> <span class="s">"love"</span><span class="o">,</span> <span class="s">"good"</span><span class="o">,</span> <span class="s">"great"</span><span class="o">,</span> <span class="s">"happy"</span><span class="o">,</span> <span class="s">"cool"</span><span class="o">,</span> <span class="s">"the"</span><span class="o">,</span> <span class="s">"one"</span><span class="o">,</span> <span class="s">"that"</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">"hate"</span><span class="o">,</span> <span class="s">"bad"</span><span class="o">,</span> <span class="s">"stupid"</span><span class="o">,</span> <span class="s">"is"</span><span class="o">)</span>
