Repository: bahir-website Updated Branches: refs/heads/asf-site a2619a72b -> 1dccb9c2d
Publishing from f8d356989c150427f4d85c1ff12e2f06864f4d63 Project: http://git-wip-us.apache.org/repos/asf/bahir-website/repo Commit: http://git-wip-us.apache.org/repos/asf/bahir-website/commit/1dccb9c2 Tree: http://git-wip-us.apache.org/repos/asf/bahir-website/tree/1dccb9c2 Diff: http://git-wip-us.apache.org/repos/asf/bahir-website/diff/1dccb9c2 Branch: refs/heads/asf-site Commit: 1dccb9c2d1c00d404e83e5b8607f95cf42812a74 Parents: a2619a7 Author: Luciano Resende <[email protected]> Authored: Wed Aug 10 14:14:02 2016 -0700 Committer: Luciano Resende <[email protected]> Committed: Wed Aug 10 14:14:02 2016 -0700 ---------------------------------------------------------------------- content/community-members/index.html | 12 ++ content/community/index.html | 12 ++ content/contributing-extensions/index.html | 12 ++ content/contributing/index.html | 12 ++ .../docs/spark/current/documentation/index.html | 45 ++-- .../current/spark-sql-streaming-mqtt.template | 209 +++++++++++++++++++ .../current/spark-sql-streaming-mqtt/index.html | 131 ++++++------ .../spark/current/spark-streaming-akka.template | 208 ++++++++++++++++++ .../current/spark-streaming-akka/index.html | 58 ++--- .../spark/current/spark-streaming-mqtt.template | 209 +++++++++++++++++++ .../current/spark-streaming-mqtt/index.html | 47 +++-- .../current/spark-streaming-twitter.template | 208 ++++++++++++++++++ .../current/spark-streaming-twitter/index.html | 51 +++-- .../current/spark-streaming-zeromq.template | 208 ++++++++++++++++++ .../current/spark-streaming-zeromq/index.html | 47 +++-- content/download/index.html | 12 ++ content/feed.xml | 4 +- content/history/index.html | 12 ++ content/index.html | 12 ++ content/privacy-policy/index.html | 12 ++ 20 files changed, 1352 insertions(+), 169 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/community-members/index.html ---------------------------------------------------------------------- diff --git a/content/community-members/index.html b/content/community-members/index.html index 3fa877a..c982c1e 100644 --- a/content/community-members/index.html +++ b/content/community-members/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/community/index.html ---------------------------------------------------------------------- diff --git a/content/community/index.html b/content/community/index.html index 037d11c..8f4f7b2 100644 --- a/content/community/index.html +++ b/content/community/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/contributing-extensions/index.html ---------------------------------------------------------------------- diff --git a/content/contributing-extensions/index.html b/content/contributing-extensions/index.html index 09fdb84..b7f4b11 100644 --- a/content/contributing-extensions/index.html +++ b/content/contributing-extensions/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/contributing/index.html ---------------------------------------------------------------------- diff --git a/content/contributing/index.html b/content/contributing/index.html index 504dc57..efb6eb6 100644 --- a/content/contributing/index.html +++ b/content/contributing/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/documentation/index.html ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/documentation/index.html b/content/docs/spark/current/documentation/index.html index 2dd98ad..544178c 100644 --- a/content/docs/spark/current/documentation/index.html +++ b/content/docs/spark/current/documentation/index.html @@ -3,8 +3,8 @@ <html lang="en"> <head> <meta charset="utf-8"> - <title>Documentation</title> - <meta name="description" content="Project Documentation page"> + <title>Extensions for Apache Spark</title> + <meta name="description" content="Extensions for Apache Spark"> <meta name="author" content=""> <!-- Enable responsive viewport --> @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> @@ -126,7 +138,7 @@ <div class="container"> -<!--<div class="hero-unit Documentation"> +<!--<div class="hero-unit Extensions for Apache Spark"> <h1></h1> </div> --> @@ -137,22 +149,25 @@ --> -<h2 id="apache-spark-extensions-documentation">Apache Spark Extensions Documentation</h2> +<h3 id="apache-bahir-extensions-for-apache-spark">Apache Bahir Extensions for Apache Spark</h3> + +<p><br /></p> + +<h4 id="structured-streaming-data-sources">Structured Streaming Data Sources</h4> + +<p><a href="/docs/spark/current/spark-sql-streaming-mqtt">MQTT data source</a></p> + +<p><br /></p> + +<h4 id="discretized-streams-dstreams-connectors">Discretized Streams (DStreams) Connectors</h4> -<h3 id="structured-streaming-data-sources">Structured Streaming Data Sources</h3> +<p><a href="/docs/spark/current/spark-streaming-akka">Akka connector</a></p> -<ul> - <li><a href="/docs/spark/current/spark-sql-streaming-mqtt">MQTT</a></li> -</ul> +<p><a href="/docs/spark/current/spark-streaming-mqtt">MQTT connector</a></p> -<h3 id="dstreaming-data-sources">DStreaming Data Sources</h3> +<p><a href="/docs/spark/current/spark-streaming-twitter">Twitter connector</a></p> -<ul> - <li><a href="/docs/spark/current/spark-streaming-akka">Akka</a></li> - <li><a href="/docs/spark/current/spark-streaming-mqtt">MQTT</a></li> - <li><a href="/docs/spark/current/spark-streaming-twitter">Twitter</a></li> - <li><a href="/docs/spark/current/spark-streaming-zeromq">ZeroMQ</a></li> -</ul> +<p><a href="/docs/spark/current/spark-streaming-zeromq">ZeroMQ connector</a></p> </div> </div> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-sql-streaming-mqtt.template ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-sql-streaming-mqtt.template b/content/docs/spark/current/spark-sql-streaming-mqtt.template new file mode 100644 index 0000000..19aa190 --- /dev/null +++ b/content/docs/spark/current/spark-sql-streaming-mqtt.template @@ -0,0 +1,209 @@ + +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Spark Structured Streaming MQTT</title> + <meta name="description" content="Spark Structured Streaming MQTT"> + <meta name="author" content=""> + + <!-- 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/apache-clean/bootstrap/css/bootstrap.css" rel="stylesheet"> + <link href="/assets/themes/apache-clean/css/style.css?body=1" rel="stylesheet" type="text/css"> + <link href="/assets/themes/apache-clean/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"> + --> + + <!-- make tables sortable by adding class tag "sortable" to table elements --> + <script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> + + + </head> + + <body> + + + +<!-- Navigation --> +<div id="nav-bar"> + <nav id="nav-container" class="navbar navbar-inverse " role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + + <div class="navbar-header page-scroll"> + <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 page-scroll" href="/#home">Home</a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <nav class="navbar-collapse collapse" role="navigation"> + <ul class="nav navbar-nav"> + + <li id="community"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/community" target="_self">Get Involved</a></li> + + + <li><a href="/contributing" target="_self">Contributing</a></li> + + + <li><a href="/contributing-extensions" target="_self">Contributing Extensions</a></li> + + + <li><a href="https://issues.apache.org/jira/browse/BAHIR" target="_blank">Issue Tracker</a></li> + + + <li><a href="https://github.com/apache/bahir" target="_blank">Source Code</a></li> + + + <li><a href="/community-members" target="_self">Project Committers</a></li> + + </ul> + + </li> + + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + + <li id="github"> + + + <a href="https://github.com/apache/bahir" target="_blank">GitHub</a> + + </li> + + <li id="apache"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="http://www.apache.org/foundation/how-it-works.html" target="_blank">Apache Software Foundation</a></li> + + + <li><a href="http://www.apache.org/licenses/" target="_blank">Apache License</a></li> + + + <li><a href="http://www.apache.org/foundation/sponsorship" target="_blank">Sponsorship</a></li> + + + <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li> + + + <li><a href="/privacy-policy" target="_self">Privacy Policy</a></li> + + </ul> + + </li> + + </ul> + </nav><!--/.navbar-collapse --> + <!-- /.navbar-collapse --> + </div> + <!-- /.container --> + </nav> +</div> + + + <div class="container"> + + +<!--<div class="hero-unit Spark Structured Streaming MQTT"> + <h1></h1> +</div> +--> + +<div class="row"> + <div class="col-md-12"> + <!-- + +--> + + + + + </div> +</div> + + + + <hr> + + <!-- <p>© 2016 </p>--> + <footer class="site-footer"> + <div class="wrapper"> + <div class="footer-col-wrapper"> + + <div style="text-align:center;"> + + <div> + Copyright © 2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. + Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version + 2.0</a>. + <br> + + Apache and the Apache Feather logo are trademarks of The Apache Software Foundation. + + </div> + </div> + </div> + </div> +</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-79140859-1', 'bahir.apache.org'); + ga('require', 'linkid', 'linkid.js'); + ga('send', 'pageview'); + +</script> + + + + <script src="/assets/themes/apache-clean/jquery/jquery-2.1.1.min.js"></script> + + <script src="/assets/themes/apache-clean/bootstrap/js/bootstrap.min.js"></script> + + + </body> +</html> + http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-sql-streaming-mqtt/index.html ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-sql-streaming-mqtt/index.html b/content/docs/spark/current/spark-sql-streaming-mqtt/index.html index 4bcd449..f47c64a 100644 --- a/content/docs/spark/current/spark-sql-streaming-mqtt/index.html +++ b/content/docs/spark/current/spark-sql-streaming-mqtt/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> @@ -143,26 +155,23 @@ <p>Using SBT:</p> -<p><code>scala -libraryDependencies += "org.apache.bahir" %% "spark-sql-streaming-mqtt" % "2.0.0" -</code></p> +<pre><code>libraryDependencies += "org.apache.bahir" %% "spark-sql-streaming-mqtt" % "2.0.0" +</code></pre> <p>Using Maven:</p> -<p>```xml</p> -<dependency> - <groupid>org.apache.bahir</groupid> - <artifactid>spark-sql-streaming-mqtt_2.11</artifactid> - <version>2.0.0</version> -</dependency> -<p>```</p> +<pre><code><dependency> + <groupId>org.apache.bahir</groupId> + <artifactId>spark-sql-streaming-mqtt_2.11</artifactId> + <version>2.0.0</version> +</dependency> +</code></pre> <p>This library can also be added to Spark jobs launched through <code>spark-shell</code> or <code>spark-submit</code> by using the <code>--packages</code> command line option. For example, to include it when starting the spark shell:</p> -<p><code> -$ bin/spark-shell --packages org.apache.bahir:spark-sql-streaming-mqtt_2.11:2.0.0 -</code></p> +<pre><code>$ bin/spark-shell --packages org.apache.bahir:spark-sql-streaming-mqtt_2.11:2.0.0 +</code></pre> <p>Unlike using <code>--jars</code>, using <code>--packages</code> ensures that this library and its dependencies will be added to the classpath. The <code>--packages</code> argument can also be used with <code>bin/spark-submit</code>.</p> @@ -173,40 +182,35 @@ The <code>--packages</code> argument can also be used with <code>bin/spark-submi <p>A SQL Stream can be created with data streams received through MQTT Server using,</p> -<p>```scala -sqlContext.readStream - .format(âorg.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProviderâ) - .option(âtopicâ, âmytopicâ) - .load(âtcp://localhost:1883â)</p> - -<p>```</p> +<pre><code>sqlContext.readStream + .format("org.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProvider") + .option("topic", "mytopic") + .load("tcp://localhost:1883") +</code></pre> <h2 id="enable-recovering-from-failures">Enable recovering from failures.</h2> <p>Setting values for option <code>localStorage</code> and <code>clientId</code> helps in recovering in case of a restart, by restoring the state where it left off before the shutdown.</p> -<p>```scala -sqlContext.readStream - .format(âorg.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProviderâ) - .option(âtopicâ, âmytopicâ) - .option(âlocalStorageâ, â/path/to/localdirâ) - .option(âclientIdâ, âsome-client-idâ) - .load(âtcp://localhost:1883â)</p> - -<p>```</p> +<pre><code>sqlContext.readStream + .format("org.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProvider") + .option("topic", "mytopic") + .option("localStorage", "/path/to/localdir") + .option("clientId", "some-client-id") + .load("tcp://localhost:1883") +</code></pre> <h3 id="scala-api">Scala API</h3> <p>An example, for scala API to count words from incoming message stream.</p> -<p>```scala - // Create DataFrame representing the stream of input lines from connection to mqtt server - val lines = spark.readStream - .format(âorg.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProviderâ) - .option(âtopicâ, topic) - .load(brokerUrl).as[(String, Timestamp)]</p> +<pre><code>// Create DataFrame representing the stream of input lines from connection to mqtt server +val lines = spark.readStream + .format("org.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProvider") + .option("topic", topic) + .load(brokerUrl).as[(String, Timestamp)] -<pre><code>// Split the lines into words +// Split the lines into words val words = lines.map(_._1).flatMap(_.split(" ")) // Generate running word count @@ -221,40 +225,37 @@ val query = wordCounts.writeStream query.awaitTermination() </code></pre> -<p>``` -Please see <code>MQTTStreamWordCount.scala</code> for full example.</p> +<p>Please see <code>MQTTStreamWordCount.scala</code> for full example.</p> <h3 id="java-api">Java API</h3> <p>An example, for Java API to count words from incoming message stream.</p> -<p>```java</p> - -<pre><code> // Create DataFrame representing the stream of input lines from connection to mqtt server. - Dataset<String> lines = spark - .readStream() - .format("org.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProvider") - .option("topic", topic) - .load(brokerUrl).select("value").as(Encoders.STRING()); - - // Split the lines into words - Dataset<String> words = lines.flatMap(new FlatMapFunction<String, String>() { - @Override - public Iterator<String> call(String x) { - return Arrays.asList(x.split(" ")).iterator(); - } - }, Encoders.STRING()); - - // Generate running word count - Dataset<Row> wordCounts = words.groupBy("value").count(); - - // Start running the query that prints the running counts to the console - StreamingQuery query = wordCounts.writeStream() - .outputMode("complete") - .format("console") - .start(); - - query.awaitTermination(); ``` +<pre><code>// Create DataFrame representing the stream of input lines from connection to mqtt server. +Dataset<String> lines = spark + .readStream() + .format("org.apache.bahir.sql.streaming.mqtt.MQTTStreamSourceProvider") + .option("topic", topic) + .load(brokerUrl).select("value").as(Encoders.STRING()); + +// Split the lines into words +Dataset<String> words = lines.flatMap(new FlatMapFunction<String, String>() { + @Override + public Iterator<String> call(String x) { + return Arrays.asList(x.split(" ")).iterator(); + } +}, Encoders.STRING()); + +// Generate running word count +Dataset<Row> wordCounts = words.groupBy("value").count(); + +// Start running the query that prints the running counts to the console +StreamingQuery query = wordCounts.writeStream() + .outputMode("complete") + .format("console") + .start(); + +query.awaitTermination(); </code></pre> <p>Please see <code>JavaMQTTStreamWordCount.java</code> for full example.</p> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-akka.template ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-akka.template b/content/docs/spark/current/spark-streaming-akka.template new file mode 100644 index 0000000..789dfb4 --- /dev/null +++ b/content/docs/spark/current/spark-streaming-akka.template @@ -0,0 +1,208 @@ + +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Spark Streaming Akka</title> + <meta name="description" content="Spark Streaming Akka"> + <meta name="author" content=""> + + <!-- 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/apache-clean/bootstrap/css/bootstrap.css" rel="stylesheet"> + <link href="/assets/themes/apache-clean/css/style.css?body=1" rel="stylesheet" type="text/css"> + <link href="/assets/themes/apache-clean/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"> + --> + + <!-- make tables sortable by adding class tag "sortable" to table elements --> + <script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> + + + </head> + + <body> + + + +<!-- Navigation --> +<div id="nav-bar"> + <nav id="nav-container" class="navbar navbar-inverse " role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + + <div class="navbar-header page-scroll"> + <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 page-scroll" href="/#home">Home</a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <nav class="navbar-collapse collapse" role="navigation"> + <ul class="nav navbar-nav"> + + <li id="community"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/community" target="_self">Get Involved</a></li> + + + <li><a href="/contributing" target="_self">Contributing</a></li> + + + <li><a href="/contributing-extensions" target="_self">Contributing Extensions</a></li> + + + <li><a href="https://issues.apache.org/jira/browse/BAHIR" target="_blank">Issue Tracker</a></li> + + + <li><a href="https://github.com/apache/bahir" target="_blank">Source Code</a></li> + + + <li><a href="/community-members" target="_self">Project Committers</a></li> + + </ul> + + </li> + + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + + <li id="github"> + + + <a href="https://github.com/apache/bahir" target="_blank">GitHub</a> + + </li> + + <li id="apache"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="http://www.apache.org/foundation/how-it-works.html" target="_blank">Apache Software Foundation</a></li> + + + <li><a href="http://www.apache.org/licenses/" target="_blank">Apache License</a></li> + + + <li><a href="http://www.apache.org/foundation/sponsorship" target="_blank">Sponsorship</a></li> + + + <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li> + + + <li><a href="/privacy-policy" target="_self">Privacy Policy</a></li> + + </ul> + + </li> + + </ul> + </nav><!--/.navbar-collapse --> + <!-- /.navbar-collapse --> + </div> + <!-- /.container --> + </nav> +</div> + + + <div class="container"> + + +<!--<div class="hero-unit Spark Streaming Akka"> + <h1></h1> +</div> +--> + +<div class="row"> + <div class="col-md-12"> + <!-- + +--> + + + + </div> +</div> + + + + <hr> + + <!-- <p>© 2016 </p>--> + <footer class="site-footer"> + <div class="wrapper"> + <div class="footer-col-wrapper"> + + <div style="text-align:center;"> + + <div> + Copyright © 2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. + Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version + 2.0</a>. + <br> + + Apache and the Apache Feather logo are trademarks of The Apache Software Foundation. + + </div> + </div> + </div> + </div> +</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-79140859-1', 'bahir.apache.org'); + ga('require', 'linkid', 'linkid.js'); + ga('send', 'pageview'); + +</script> + + + + <script src="/assets/themes/apache-clean/jquery/jquery-2.1.1.min.js"></script> + + <script src="/assets/themes/apache-clean/bootstrap/js/bootstrap.min.js"></script> + + + </body> +</html> + http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-akka/index.html ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-akka/index.html b/content/docs/spark/current/spark-streaming-akka/index.html index 7969e1c..50aedaa 100644 --- a/content/docs/spark/current/spark-streaming-akka/index.html +++ b/content/docs/spark/current/spark-streaming-akka/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> @@ -143,26 +155,23 @@ <p>Using SBT:</p> -<p><code> -libraryDependencies += "org.apache.bahir" %% "spark-streaming-akka" % "2.0.0" -</code></p> +<pre><code>libraryDependencies += "org.apache.bahir" %% "spark-streaming-akka" % "2.0.0" +</code></pre> <p>Using Maven:</p> -<p>```xml</p> -<dependency> - <groupid>org.apache.bahir</groupid> - <artifactid>spark-streaming-akka_2.11</artifactid> - <version>2.0.0</version> -</dependency> -<p>```</p> +<pre><code><dependency> + <groupId>org.apache.bahir</groupId> + <artifactId>spark-streaming-akka_2.11</artifactId> + <version>2.0.0</version> +</dependency> +</code></pre> <p>This library can also be added to Spark jobs launched through <code>spark-shell</code> or <code>spark-submit</code> by using the <code>--packages</code> command line option. For example, to include it when starting the spark shell:</p> -<p><code> -$ bin/spark-shell --packages org.apache.bahir:spark-streaming_akka_2.11:2.0.0 -</code></p> +<pre><code>$ bin/spark-shell --packages org.apache.bahir:spark-streaming_akka_2.11:2.0.0 +</code></pre> <p>Unlike using <code>--jars</code>, using <code>--packages</code> ensures that this library and its dependencies will be added to the classpath. The <code>--packages</code> argument can also be used with <code>bin/spark-submit</code>.</p> @@ -178,30 +187,29 @@ The <code>--packages</code> argument can also be used with <code>bin/spark-submi <p>You need to extend <code>ActorReceiver</code> so as to store received data into Spark using <code>store(...)</code> methods. The supervisor strategy of this actor can be configured to handle failures, etc.</p> -<p>```Scala -class CustomActor extends ActorReceiver { +<pre><code>class CustomActor extends ActorReceiver { def receive = { case data: String => store(data) } -}</p> +} +</code></pre> <p>// A new input stream can be created with this custom actor as val ssc: StreamingContext = ⦠-val lines = AkkaUtils.createStream<a href="ssc, Props[CustomActor]()," title="CustomReceiver">String</a> -```</p> +val lines = AkkaUtils.createStream<a href="ssc, Props[CustomActor]()," title="CustomReceiver">String</a></p> <h3 id="java-api">Java API</h3> <p>You need to extend <code>JavaActorReceiver</code> so as to store received data into Spark using <code>store(...)</code> methods. The supervisor strategy of this actor can be configured to handle failures, etc.</p> -<p>```Java -class CustomActor extends JavaActorReceiver { - @Override - public void onReceive(Object msg) throws Exception { - store((String) msg); - } -}</p> +<pre><code>class CustomActor extends JavaActorReceiver { + @Override + public void onReceive(Object msg) throws Exception { + store((String) msg); + } +} +</code></pre> <p>// A new input stream can be created with this custom actor as JavaStreamingContext jssc = â¦; http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-mqtt.template ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-mqtt.template b/content/docs/spark/current/spark-streaming-mqtt.template new file mode 100644 index 0000000..19aa190 --- /dev/null +++ b/content/docs/spark/current/spark-streaming-mqtt.template @@ -0,0 +1,209 @@ + +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Spark Structured Streaming MQTT</title> + <meta name="description" content="Spark Structured Streaming MQTT"> + <meta name="author" content=""> + + <!-- 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/apache-clean/bootstrap/css/bootstrap.css" rel="stylesheet"> + <link href="/assets/themes/apache-clean/css/style.css?body=1" rel="stylesheet" type="text/css"> + <link href="/assets/themes/apache-clean/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"> + --> + + <!-- make tables sortable by adding class tag "sortable" to table elements --> + <script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> + + + </head> + + <body> + + + +<!-- Navigation --> +<div id="nav-bar"> + <nav id="nav-container" class="navbar navbar-inverse " role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + + <div class="navbar-header page-scroll"> + <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 page-scroll" href="/#home">Home</a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <nav class="navbar-collapse collapse" role="navigation"> + <ul class="nav navbar-nav"> + + <li id="community"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/community" target="_self">Get Involved</a></li> + + + <li><a href="/contributing" target="_self">Contributing</a></li> + + + <li><a href="/contributing-extensions" target="_self">Contributing Extensions</a></li> + + + <li><a href="https://issues.apache.org/jira/browse/BAHIR" target="_blank">Issue Tracker</a></li> + + + <li><a href="https://github.com/apache/bahir" target="_blank">Source Code</a></li> + + + <li><a href="/community-members" target="_self">Project Committers</a></li> + + </ul> + + </li> + + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + + <li id="github"> + + + <a href="https://github.com/apache/bahir" target="_blank">GitHub</a> + + </li> + + <li id="apache"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="http://www.apache.org/foundation/how-it-works.html" target="_blank">Apache Software Foundation</a></li> + + + <li><a href="http://www.apache.org/licenses/" target="_blank">Apache License</a></li> + + + <li><a href="http://www.apache.org/foundation/sponsorship" target="_blank">Sponsorship</a></li> + + + <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li> + + + <li><a href="/privacy-policy" target="_self">Privacy Policy</a></li> + + </ul> + + </li> + + </ul> + </nav><!--/.navbar-collapse --> + <!-- /.navbar-collapse --> + </div> + <!-- /.container --> + </nav> +</div> + + + <div class="container"> + + +<!--<div class="hero-unit Spark Structured Streaming MQTT"> + <h1></h1> +</div> +--> + +<div class="row"> + <div class="col-md-12"> + <!-- + +--> + + + + + </div> +</div> + + + + <hr> + + <!-- <p>© 2016 </p>--> + <footer class="site-footer"> + <div class="wrapper"> + <div class="footer-col-wrapper"> + + <div style="text-align:center;"> + + <div> + Copyright © 2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. + Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version + 2.0</a>. + <br> + + Apache and the Apache Feather logo are trademarks of The Apache Software Foundation. + + </div> + </div> + </div> + </div> +</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-79140859-1', 'bahir.apache.org'); + ga('require', 'linkid', 'linkid.js'); + ga('send', 'pageview'); + +</script> + + + + <script src="/assets/themes/apache-clean/jquery/jquery-2.1.1.min.js"></script> + + <script src="/assets/themes/apache-clean/bootstrap/js/bootstrap.min.js"></script> + + + </body> +</html> + http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-mqtt/index.html ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-mqtt/index.html b/content/docs/spark/current/spark-streaming-mqtt/index.html index 1a4b529..edcfd20 100644 --- a/content/docs/spark/current/spark-streaming-mqtt/index.html +++ b/content/docs/spark/current/spark-streaming-mqtt/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> @@ -143,26 +155,23 @@ <p>Using SBT:</p> -<p><code> -libraryDependencies += "org.apache.bahir" %% "spark-streaming-mqtt" % "2.0.0" -</code></p> +<pre><code>libraryDependencies += "org.apache.bahir" %% "spark-streaming-mqtt" % "2.0.0" +</code></pre> <p>Using Maven:</p> -<p>```xml</p> -<dependency> - <groupid>org.apache.bahir</groupid> - <artifactid>spark-streaming-mqtt_2.11</artifactid> - <version>2.0.0</version> -</dependency> -<p>```</p> +<pre><code><dependency> + <groupId>org.apache.bahir</groupId> + <artifactId>spark-streaming-mqtt_2.11</artifactId> + <version>2.0.0</version> +</dependency> +</code></pre> <p>This library can also be added to Spark jobs launched through <code>spark-shell</code> or <code>spark-submit</code> by using the <code>--packages</code> command line option. For example, to include it when starting the spark shell:</p> -<p><code> -$ bin/spark-shell --packages org.apache.bahir:spark-streaming_mqtt_2.11:2.0.0 -</code></p> +<pre><code>$ bin/spark-shell --packages org.apache.bahir:spark-streaming_mqtt_2.11:2.0.0 +</code></pre> <p>Unlike using <code>--jars</code>, using <code>--packages</code> ensures that this library and its dependencies will be added to the classpath. The <code>--packages</code> argument can also be used with <code>bin/spark-submit</code>.</p> @@ -176,20 +185,18 @@ The <code>--packages</code> argument can also be used with <code>bin/spark-submi <p>You need to extend <code>ActorReceiver</code> so as to store received data into Spark using <code>store(...)</code> methods. The supervisor strategy of this actor can be configured to handle failures, etc.</p> -<p><code>Scala -val lines = MQTTUtils.createStream(ssc, brokerUrl, topic) -</code></p> +<pre><code>val lines = MQTTUtils.createStream(ssc, brokerUrl, topic) +</code></pre> <h3 id="java-api">Java API</h3> <p>You need to extend <code>JavaActorReceiver</code> so as to store received data into Spark using <code>store(...)</code> methods. The supervisor strategy of this actor can be configured to handle failures, etc.</p> -<p><code>Java -JavaDStream<String> lines = MQTTUtils.createStream(jssc, brokerUrl, topic); -</code></p> +<pre><code>JavaDStream<String> lines = MQTTUtils.createStream(jssc, brokerUrl, topic); +</code></pre> -<p>See end-to-end examples at (<a href="https://github.com/apache/bahir/tree/master/streaming-mqtt/examples">MQTT Examples</a></p> +<p>See end-to-end examples at <a href="https://github.com/apache/bahir/tree/master/streaming-mqtt/examples">MQTT Examples</a></p> </div> </div> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-twitter.template ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-twitter.template b/content/docs/spark/current/spark-streaming-twitter.template new file mode 100644 index 0000000..26c2c9d --- /dev/null +++ b/content/docs/spark/current/spark-streaming-twitter.template @@ -0,0 +1,208 @@ + +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Spark Streaming Twitter</title> + <meta name="description" content="Spark Streaming Twitter"> + <meta name="author" content=""> + + <!-- 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/apache-clean/bootstrap/css/bootstrap.css" rel="stylesheet"> + <link href="/assets/themes/apache-clean/css/style.css?body=1" rel="stylesheet" type="text/css"> + <link href="/assets/themes/apache-clean/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"> + --> + + <!-- make tables sortable by adding class tag "sortable" to table elements --> + <script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> + + + </head> + + <body> + + + +<!-- Navigation --> +<div id="nav-bar"> + <nav id="nav-container" class="navbar navbar-inverse " role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + + <div class="navbar-header page-scroll"> + <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 page-scroll" href="/#home">Home</a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <nav class="navbar-collapse collapse" role="navigation"> + <ul class="nav navbar-nav"> + + <li id="community"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/community" target="_self">Get Involved</a></li> + + + <li><a href="/contributing" target="_self">Contributing</a></li> + + + <li><a href="/contributing-extensions" target="_self">Contributing Extensions</a></li> + + + <li><a href="https://issues.apache.org/jira/browse/BAHIR" target="_blank">Issue Tracker</a></li> + + + <li><a href="https://github.com/apache/bahir" target="_blank">Source Code</a></li> + + + <li><a href="/community-members" target="_self">Project Committers</a></li> + + </ul> + + </li> + + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + + <li id="github"> + + + <a href="https://github.com/apache/bahir" target="_blank">GitHub</a> + + </li> + + <li id="apache"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="http://www.apache.org/foundation/how-it-works.html" target="_blank">Apache Software Foundation</a></li> + + + <li><a href="http://www.apache.org/licenses/" target="_blank">Apache License</a></li> + + + <li><a href="http://www.apache.org/foundation/sponsorship" target="_blank">Sponsorship</a></li> + + + <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li> + + + <li><a href="/privacy-policy" target="_self">Privacy Policy</a></li> + + </ul> + + </li> + + </ul> + </nav><!--/.navbar-collapse --> + <!-- /.navbar-collapse --> + </div> + <!-- /.container --> + </nav> +</div> + + + <div class="container"> + + +<!--<div class="hero-unit Spark Streaming Twitter"> + <h1></h1> +</div> +--> + +<div class="row"> + <div class="col-md-12"> + <!-- + +--> + + + + </div> +</div> + + + + <hr> + + <!-- <p>© 2016 </p>--> + <footer class="site-footer"> + <div class="wrapper"> + <div class="footer-col-wrapper"> + + <div style="text-align:center;"> + + <div> + Copyright © 2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. + Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version + 2.0</a>. + <br> + + Apache and the Apache Feather logo are trademarks of The Apache Software Foundation. + + </div> + </div> + </div> + </div> +</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-79140859-1', 'bahir.apache.org'); + ga('require', 'linkid', 'linkid.js'); + ga('send', 'pageview'); + +</script> + + + + <script src="/assets/themes/apache-clean/jquery/jquery-2.1.1.min.js"></script> + + <script src="/assets/themes/apache-clean/bootstrap/js/bootstrap.min.js"></script> + + + </body> +</html> + http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-twitter/index.html ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-twitter/index.html b/content/docs/spark/current/spark-streaming-twitter/index.html index 07d23d8..949098d 100644 --- a/content/docs/spark/current/spark-streaming-twitter/index.html +++ b/content/docs/spark/current/spark-streaming-twitter/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> @@ -143,26 +155,23 @@ <p>Using SBT:</p> -<p><code> -libraryDependencies += "org.apache.bahir" %% "spark-streaming-twitter" % "2.0.0" -</code></p> +<pre><code>libraryDependencies += "org.apache.bahir" %% "spark-streaming-twitter" % "2.0.0" +</code></pre> <p>Using Maven:</p> -<p>```xml</p> -<dependency> - <groupid>org.apache.bahir</groupid> - <artifactid>spark-streaming-twitter_2.11</artifactid> - <version>2.0.0</version> -</dependency> -<p>```</p> +<pre><code><dependency> + <groupId>org.apache.bahir</groupId> + <artifactId>spark-streaming-twitter_2.11</artifactId> + <version>2.0.0</version> +</dependency> +</code></pre> <p>This library can also be added to Spark jobs launched through <code>spark-shell</code> or <code>spark-submit</code> by using the <code>--packages</code> command line option. For example, to include it when starting the spark shell:</p> -<p><code> -$ bin/spark-shell --packages org.apache.bahir:spark-streaming_twitter_2.11:2.0.0 -</code></p> +<pre><code>$ bin/spark-shell --packages org.apache.bahir:spark-streaming_twitter_2.11:2.0.0 +</code></pre> <p>Unlike using <code>--jars</code>, using <code>--packages</code> ensures that this library and its dependencies will be added to the classpath. The <code>--packages</code> argument can also be used with <code>bin/spark-submit</code>.</p> @@ -176,22 +185,20 @@ can be provided by any of the <a href="http://twitter4j.org/en/configuration.htm <h3 id="scala-api">Scala API</h3> -<p>```Scala -import org.apache.spark.streaming.twitter._</p> +<pre><code>import org.apache.spark.streaming.twitter._ -<p>TwitterUtils.createStream(ssc, None) -```</p> +TwitterUtils.createStream(ssc, None) +</code></pre> <h3 id="java-api">Java API</h3> -<p>```Java -import org.apache.spark.streaming.twitter.*;</p> +<pre><code>import org.apache.spark.streaming.twitter.*; -<p>TwitterUtils.createStream(jssc); -```</p> +TwitterUtils.createStream(jssc); +</code></pre> <p>You can also either get the public stream, or get the filtered stream based on keywords. -See end-to-end examples at (<a href="https://github.com/apache/bahir/tree/master/streaming-twitter/examples">Twitter Examples</a></p> +See end-to-end examples at <a href="https://github.com/apache/bahir/tree/master/streaming-twitter/examples">Twitter Examples</a></p> </div> </div> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-zeromq.template ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-zeromq.template b/content/docs/spark/current/spark-streaming-zeromq.template new file mode 100644 index 0000000..113a583 --- /dev/null +++ b/content/docs/spark/current/spark-streaming-zeromq.template @@ -0,0 +1,208 @@ + +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Spark Streaming ZeroMQ</title> + <meta name="description" content="Spark Streaming ZeroMQ"> + <meta name="author" content=""> + + <!-- 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/apache-clean/bootstrap/css/bootstrap.css" rel="stylesheet"> + <link href="/assets/themes/apache-clean/css/style.css?body=1" rel="stylesheet" type="text/css"> + <link href="/assets/themes/apache-clean/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"> + --> + + <!-- make tables sortable by adding class tag "sortable" to table elements --> + <script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> + + + </head> + + <body> + + + +<!-- Navigation --> +<div id="nav-bar"> + <nav id="nav-container" class="navbar navbar-inverse " role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + + <div class="navbar-header page-scroll"> + <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 page-scroll" href="/#home">Home</a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <nav class="navbar-collapse collapse" role="navigation"> + <ul class="nav navbar-nav"> + + <li id="community"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/community" target="_self">Get Involved</a></li> + + + <li><a href="/contributing" target="_self">Contributing</a></li> + + + <li><a href="/contributing-extensions" target="_self">Contributing Extensions</a></li> + + + <li><a href="https://issues.apache.org/jira/browse/BAHIR" target="_blank">Issue Tracker</a></li> + + + <li><a href="https://github.com/apache/bahir" target="_blank">Source Code</a></li> + + + <li><a href="/community-members" target="_self">Project Committers</a></li> + + </ul> + + </li> + + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + + <li id="github"> + + + <a href="https://github.com/apache/bahir" target="_blank">GitHub</a> + + </li> + + <li id="apache"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="http://www.apache.org/foundation/how-it-works.html" target="_blank">Apache Software Foundation</a></li> + + + <li><a href="http://www.apache.org/licenses/" target="_blank">Apache License</a></li> + + + <li><a href="http://www.apache.org/foundation/sponsorship" target="_blank">Sponsorship</a></li> + + + <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li> + + + <li><a href="/privacy-policy" target="_self">Privacy Policy</a></li> + + </ul> + + </li> + + </ul> + </nav><!--/.navbar-collapse --> + <!-- /.navbar-collapse --> + </div> + <!-- /.container --> + </nav> +</div> + + + <div class="container"> + + +<!--<div class="hero-unit Spark Streaming ZeroMQ"> + <h1></h1> +</div> +--> + +<div class="row"> + <div class="col-md-12"> + <!-- + +--> + + + + </div> +</div> + + + + <hr> + + <!-- <p>© 2016 </p>--> + <footer class="site-footer"> + <div class="wrapper"> + <div class="footer-col-wrapper"> + + <div style="text-align:center;"> + + <div> + Copyright © 2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. + Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version + 2.0</a>. + <br> + + Apache and the Apache Feather logo are trademarks of The Apache Software Foundation. + + </div> + </div> + </div> + </div> +</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-79140859-1', 'bahir.apache.org'); + ga('require', 'linkid', 'linkid.js'); + ga('send', 'pageview'); + +</script> + + + + <script src="/assets/themes/apache-clean/jquery/jquery-2.1.1.min.js"></script> + + <script src="/assets/themes/apache-clean/bootstrap/js/bootstrap.min.js"></script> + + + </body> +</html> + http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/docs/spark/current/spark-streaming-zeromq/index.html ---------------------------------------------------------------------- diff --git a/content/docs/spark/current/spark-streaming-zeromq/index.html b/content/docs/spark/current/spark-streaming-zeromq/index.html index 383dfd0..cc54851 100644 --- a/content/docs/spark/current/spark-streaming-zeromq/index.html +++ b/content/docs/spark/current/spark-streaming-zeromq/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> @@ -143,26 +155,23 @@ <p>Using SBT:</p> -<p><code> -libraryDependencies += "org.apache.bahir" %% "spark-streaming-zeromq" % "2.0.0" -</code></p> +<pre><code>libraryDependencies += "org.apache.bahir" %% "spark-streaming-zeromq" % "2.0.0" +</code></pre> <p>Using Maven:</p> -<p>```xml</p> -<dependency> - <groupid>org.apache.bahir</groupid> - <artifactid>spark-streaming-zeromq_2.11</artifactid> - <version>2.0.0</version> -</dependency> -<p>```</p> +<pre><code><dependency> + <groupId>org.apache.bahir</groupId> + <artifactId>spark-streaming-zeromq_2.11</artifactId> + <version>2.0.0</version> +</dependency> +</code></pre> <p>This library can also be added to Spark jobs launched through <code>spark-shell</code> or <code>spark-submit</code> by using the <code>--packages</code> command line option. For example, to include it when starting the spark shell:</p> -<p><code> -$ bin/spark-shell --packages org.apache.bahir:spark-streaming_zeromq_2.11:2.0.0 -</code></p> +<pre><code>$ bin/spark-shell --packages org.apache.bahir:spark-streaming_zeromq_2.11:2.0.0 +</code></pre> <p>Unlike using <code>--jars</code>, using <code>--packages</code> ensures that this library and its dependencies will be added to the classpath. The <code>--packages</code> argument can also be used with <code>bin/spark-submit</code>.</p> @@ -173,17 +182,15 @@ The <code>--packages</code> argument can also be used with <code>bin/spark-submi <h3 id="scala-api">Scala API</h3> -<p><code>Scala -val lines = ZeroMQUtils.createStream(ssc, ...) -</code></p> +<pre><code>val lines = ZeroMQUtils.createStream(ssc, ...) +</code></pre> <h3 id="java-api">Java API</h3> -<p><code>Java -JavaDStream<String> lines = ZeroMQUtils.createStream(jssc, ...); -</code></p> +<pre><code>JavaDStream<String> lines = ZeroMQUtils.createStream(jssc, ...); +</code></pre> -<p>See end-to-end examples at (<a href="https://github.com/apache/bahir/tree/master/streaming-zeromq/examples">ZeroMQ Examples</a></p> +<p>See end-to-end examples at <a href="https://github.com/apache/bahir/tree/master/streaming-zeromq/examples">ZeroMQ Examples</a></p> </div> </div> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/download/index.html ---------------------------------------------------------------------- diff --git a/content/download/index.html b/content/download/index.html index e3c93a2..b7449d5 100644 --- a/content/download/index.html +++ b/content/download/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/feed.xml ---------------------------------------------------------------------- diff --git a/content/feed.xml b/content/feed.xml index 4bce20e..6fd6e15 100644 --- a/content/feed.xml +++ b/content/feed.xml @@ -6,8 +6,8 @@ </description> <link>http://bahir.apache.org/</link> <atom:link href="http://bahir.apache.org/feed.xml" rel="self" type="application/rss+xml"/> - <pubDate>Tue, 09 Aug 2016 15:48:45 -0700</pubDate> - <lastBuildDate>Tue, 09 Aug 2016 15:48:45 -0700</lastBuildDate> + <pubDate>Wed, 10 Aug 2016 14:14:01 -0700</pubDate> + <lastBuildDate>Wed, 10 Aug 2016 14:14:01 -0700</lastBuildDate> <generator>Jekyll v3.0.0</generator> <item> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/history/index.html ---------------------------------------------------------------------- diff --git a/content/history/index.html b/content/history/index.html index c8371a5..7fd19b6 100644 --- a/content/history/index.html +++ b/content/history/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/index.html ---------------------------------------------------------------------- diff --git a/content/index.html b/content/index.html index 5001014..5e14dd0 100644 --- a/content/index.html +++ b/content/index.html @@ -95,6 +95,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github"> http://git-wip-us.apache.org/repos/asf/bahir-website/blob/1dccb9c2/content/privacy-policy/index.html ---------------------------------------------------------------------- diff --git a/content/privacy-policy/index.html b/content/privacy-policy/index.html index 8daeafd..8bdd61f 100644 --- a/content/privacy-policy/index.html +++ b/content/privacy-policy/index.html @@ -83,6 +83,18 @@ </li> + <li id="documentation"> + + <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a> + <ul class="dropdown-menu dropdown-left"> + + + <li><a href="/docs/spark/current/documentation" target="_self">Current</a></li> + + </ul> + + </li> + <li id="github">
