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 2015/10/17 21:05:13 UTC
svn commit: r1709208 - /incubator/zeppelin/site/docs/interpreter/flink.html
Author: moon
Date: Sat Oct 17 19:05:12 2015
New Revision: 1709208
URL: http://svn.apache.org/viewvc?rev=1709208&view=rev
Log:
Add flink.html
Added:
incubator/zeppelin/site/docs/interpreter/flink.html
Added: incubator/zeppelin/site/docs/interpreter/flink.html
URL: http://svn.apache.org/viewvc/incubator/zeppelin/site/docs/interpreter/flink.html?rev=1709208&view=auto
==============================================================================
--- incubator/zeppelin/site/docs/interpreter/flink.html (added)
+++ incubator/zeppelin/site/docs/interpreter/flink.html Sat Oct 17 19:05:12 2015
@@ -0,0 +1,405 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Flink Interpreter</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="/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 Flink Interpreter">
+ <h1></h1>
+</div>
+-->
+
+<div class="row">
+ <div class="col-md-12">
+ <h2>Flink interpreter for Apache Zeppelin</h2>
+
+<p><a href="https://flink.apache.org">Apache Flink</a> is an open source platform for distributed stream and batch data processing.</p>
+
+<h3>How to start local Flink cluster, to test the interpreter</h3>
+
+<p>Zeppelin comes with pre-configured flink-local interpreter, which starts Flink in a local mode on your machine, so you do not need to install anything.</p>
+
+<h3>How to configure interpreter to point to Flink cluster</h3>
+
+<p>At the "Interpreters" menu, you have to create a new Flink interpreter and provide next properties:</p>
+
+<p>property | value | Description
+---------|----------|-----
+host | local | host name of running JobManager. 'local' runs flink in local mode (default)
+port | 6123 | port of running JobManager
+xxx | yyy | anything else from <a href="https://ci.apache.org/projects/flink/flink-docs-release-0.9/setup/config.html">Flink Configuration</a></p>
+
+<h3>How to test it's working</h3>
+
+<p>In example, by using the <a href="https://www.zeppelinhub.com/viewer/notebooks/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL05GTGFicy96ZXBwZWxpbi1ub3RlYm9va3MvbWFzdGVyL25vdGVib29rcy8yQVFFREs1UEMvbm90ZS5qc29u">Zeppelin notebook</a> is from <a href="http://www.slideshare.net/tillrohrmann/data-analysis-49806564">Till Rohrmann's presentation</a> "Interactive data analysis with Apache Flink" for Apache Flink Meetup.</p>
+<div class="highlight"><pre><code class="text language-text" data-lang="text">%sh
+rm 10.txt.utf-8
+wget http://www.gutenberg.org/ebooks/10.txt.utf-8
+</code></pre></div><div class="highlight"><pre><code class="text language-text" data-lang="text">%flink
+case class WordCount(word: String, frequency: Int)
+val bible:DataSet[String] = env.readTextFile("10.txt.utf-8")
+val partialCounts: DataSet[WordCount] = bible.flatMap{
+ line =>
+ """\b\w+\b""".r.findAllIn(line).map(word => WordCount(word, 1))
+// line.split(" ").map(word => WordCount(word, 1))
+}
+val wordCounts = partialCounts.groupBy("word").reduce{
+ (left, right) => WordCount(left.word, left.frequency + right.frequency)
+}
+val result10 = wordCounts.first(10).collect()
+</code></pre></div>
+ </div>
+</div>
+
+
+ <hr>
+ <footer>
+ <!-- <p>© 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>
+