Starting to document the storm plugin
This commit is contained in:
parent
846e76a70f
commit
0d959c867a
|
@ -505,15 +505,100 @@ table.CodeRay td.code>pre{padding:0}
|
|||
<h1>The Storm Plugin</h1>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="toctitle">Table of Contents</div>
|
||||
|
||||
<ul class="sectlevel1">
|
||||
<li><a href="#_working_with_a_basic_topology">Working with a basic topology</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div id="preamble">
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The
|
||||
<a href="http://plugins.gradle.org/plugin/com.github.jruby-gradle.storm">jruby-gradle
|
||||
storm plugin</a> enables developers to build, test and deploy
|
||||
<a href="http://storm;apache.org">Apache Storm</a> topologies in JRuby.</p>
|
||||
</div>
|
||||
<div class="admonitionblock note">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<div class="title">Note</div>
|
||||
</td>
|
||||
<td class="content">
|
||||
To learn more about Apache Storm itself, please consult
|
||||
<a href="http://storm.apache.org/documentation/Home.html">their documentation</a>. This
|
||||
documentation intends only to cover the JRuby Gradle plugin’s functionality.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_working_with_a_basic_topology">Working with a basic topology</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="listingblock">
|
||||
<div class="title">build.gradle</div>
|
||||
<div class="content">
|
||||
<pre class="CodeRay highlight"><code data-lang="gradle">buildscript {
|
||||
repositories { jcenter() }
|
||||
dependencies {
|
||||
classpath 'com.github.jruby-gradle:jruby-gradle-storm-plugin:0.1.6+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.jruby-gradle.storm'
|
||||
|
||||
/* Need the JRubyStormLocal task to run a "local topology" */
|
||||
import com.github.jrubygradle.storm.JRubyStormLocal
|
||||
|
||||
dependencies {
|
||||
/* Including a Ruby gem dependency for our topology */
|
||||
gems 'rubygems:colorize:0.7.3+'
|
||||
|
||||
/* Our topology consumes from Kafka so we need our Java dependencies to be
|
||||
* enumerated under the `jrubyStorm` configuration so they get properly
|
||||
* unpacked into the resulting topology .jar file
|
||||
*/
|
||||
jrubyStorm group: 'org.apache.storm',
|
||||
name: 'storm-kafka',
|
||||
version: '0.9.2-incubating',
|
||||
transitive: false
|
||||
jrubyStorm group: 'org.apache.kafka',
|
||||
name: 'kafka_2.10',
|
||||
version: '0.8.1.+'
|
||||
|
||||
/* Excluding Zookeeper because storm-core is already pulling in ZK as
|
||||
* dependency to prevent conflicts
|
||||
*/
|
||||
jrubyStorm('org.apache.curator:curator-framework:2+') {
|
||||
exclude module: 'zookeeper'
|
||||
}
|
||||
}
|
||||
|
||||
// topologies/ and bolts/ are already included by default, so we just need to
|
||||
// add a few more files to the jar file
|
||||
jrubyStorm {
|
||||
/* Pull our code from lib/ into the root of the topology */
|
||||
from 'lib'
|
||||
/* Pull the code in config/ into a config/ dir in the topology */
|
||||
into('config') { from 'config' }
|
||||
}
|
||||
|
||||
task runLocal(type: JRubyStormLocal) {
|
||||
description 'Run the topology in local topology mode'
|
||||
topology 'topologies/basic_topology.rb'
|
||||
standardInput System.in
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2014-12-08 16:43:17 PST
|
||||
Last updated 2014-12-08 18:38:47 PST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue