Commit Graph

231 Commits

Author SHA1 Message Date
R. Tyler Croy a505e9c5c8
Rely on our file path containing stormjar.jar in order to determine if we're ina supervisor
This is admittedly a bit hackish but I have yet to find any data at runtime
that indicates whether we're executing inside of a local mode (non jar) or
clustered mode other than this

Fixes #16
2015-09-11 15:18:25 -07:00
R. Tyler Croy a0249a7d7a
Executing on a supervisor via a bolt/etc we must set up the embedded env properly
The main() function isn't going to be executed when the topology is sent over
to the cluster, redstorm/environment will be loaded properly on
supervisor-based execution however, so mucking with these globals there seems
like a reasonable approach

References #12
2015-09-11 10:53:21 -07:00
R. Tyler Croy 7f0b8a5520
Removing some older unnecessary crud
Fixes #13
2015-09-09 13:17:02 -07:00
R. Tyler Croy 23b6fdd4e3
Use the uri:classloader:/ custom path for setting up JARS_HOME and $LOAD_PATH
This will help the submitted topology operate much more like an embedded JRuby
use-case thanks to the recent improvements that @mkristian has made in JRuby
core

Fixes #12
2015-09-09 13:14:42 -07:00
Robert Bavey d790474151 Avoid using Pathname to compute relative paths in spout
Merge inadvertently changed inherited method to once again use
Pathname to compute relative paths. This change once more allows
the code to work either in a jar context, or a .rb file on
the filesystem.
2015-08-31 16:04:06 -04:00
Robert Bavey c549d701d5 Merge commit 'refs/pull/129/head' of https://github.com/colinsurprenant/redstorm
Conflicts:
	Gemfile.lock
	lib/red_storm/dsl/bolt.rb
	lib/red_storm/dsl/spout.rb
	redstorm.gemspec
2015-08-27 14:49:57 -04:00
Keith Walters 67fd211d4d Wrongly assumed topo bolts inherit from redstorm
Not all bolts defined in a topology inherit from the RedStorm::DSL. This
ensures the output fields in the ComponentDefinition are only copied if
the class uses the OutputFields module. Also, redefining field names for
the default stream will replace any previously defined default field
names.
2015-04-16 23:23:00 +00:00
Keith Walters db8547ebd6 Output fields in ruby classes are declared in java
Fixes an issue where outfields that are defined in the Spout or Bolt are
not recognized by the Nimbus server when it validates the existence of
streams for all bolts in the topology.
2015-04-16 21:16:33 +00:00
Keith Walters 7b7f3f7c99 Bolt/Spouts in topos need to support streams
This commit makes it possible to declare streams and fields for bolts
and streams inside of the Topology definition.
2015-04-07 22:58:47 +00:00
R. Tyler Croy fec511c1e9 Merge remote-tracking branch 'colinsurprenant/pr/115'
Merging in colinsurprenant/redstorm#115

Conflicts:
	.gitignore
	lib/red_storm/dsl/bolt.rb
	lib/red_storm/dsl/spout.rb
2015-03-17 10:28:50 -07:00
Keith Walters dbf7888bb7 New test/specs for bolt stream support 2015-03-10 21:40:38 +00:00
Keith Walters 32cceb724e Bolts support declaring output streams 2015-03-10 16:09:21 +00:00
Keith Walters 54e43e39dc Select stream when setting source for bolt 2015-03-03 22:47:37 +00:00
R. Tyler Croy c45337add1 Add common RSpec code
Fixes #5
2014-11-15 09:27:07 -08:00
Ian Smith 5d7debdf16 This allows for on_* to be defined by defining the corresponding instance method
directly.  Prior to this fix, doing this will result in "SystemStackError: stack
level too deep".

Example
module RedStorm
  module Examples
    class SplitSentenceBolt < DSL::Bolt
      def on_receive(tuple)
        tuple[0].split(' ').map{|w| [w]}
      end
    end
  end
end
2014-11-02 09:08:04 -08:00
Ian Smith cf723b2136 rescue DEFAULT_STORM_CONF_FILE = File.expand_path('~/.storm/storm.yaml') so we can use redstorm in environments that don't have HOME set. 2014-11-02 09:07:49 -08:00
R. Tyler Croy a4e3bc6479 Dump exceptions that occur when loading a topology to stdout in the topology launcher
Fixes #3
2014-11-01 18:01:53 -07:00
R. Tyler Croy e62fe44a25 Avoid using Pathname to compute relative paths and instead rely on a fully expanded path
This will allow this code to work whether it's executing in a jar context or a
.rb file on the filesystem
2014-10-21 15:50:38 -07:00
R. Tyler Croy 41cb426076 Update the build.gradle to create a re-usable .jar file with redstorm Java and Ruby code 2014-10-20 14:18:55 -07:00
arielvalentin 02c79c9282 Using loggable in the topology 2014-08-11 22:19:34 -04:00
Midpoint Applications fde7148ee1 Using loggable module instead of redeclaring logging methods in multiple files 2014-07-30 22:49:52 -04:00
Colin Surprenant cbb62efc52 Merge pull request #117 from arielvalentin/issues-109
adding arbitrary resources to target/classes instead of just the jar
2014-07-30 02:33:11 -04:00
Mark and Ariel 65e5d19c55 adding arbitrary resources to target/classes instead of just the jar 2014-07-28 15:06:02 -04:00
Jess and Mark abc7303a88 [jess & mark] Removing signature files from dependent jars 2014-07-28 10:34:57 -04:00
Ariel S. Valentin 03de5d3456 Conforming to SLF4J named hierarchy in loggers 2014-07-28 10:23:10 -04:00
Ariel S. Valentin d847f2ca77 Using SLF4J instead of Log4J 2014-07-28 10:23:00 -04:00
Colin Surprenant 3f711edc96 Merge pull request #104 from lookout/submit_options
Expose SubmitOptions via a submit_options block (analogous to configure, etc)
2014-07-19 19:22:28 -04:00
Ian Smith 00c42f5c14 OutputCollector patch 2014-07-15 13:42:56 -07:00
Ian Smith 9de8991f31 Expose SubmitOptions via a submit_options block (analogous to configure, etc). 2014-07-15 13:13:40 -07:00
Colin Surprenant ddb49f4f90 renamed JRubyProxyFunction to JRubyTridentFunction 2014-03-02 19:43:10 -05:00
Colin Surprenant 1fac3b51df updated dependencies, jruby 1.7.11 and storm 0.9.1-incubating 2014-03-02 04:33:30 -05:00
Colin Surprenant ba19200e6b removed remaining ruby proxy classes, java proxies now use JRuby API directly 2014-03-02 03:04:01 -05:00
Colin Surprenant 3ab50925e9 bumped version 2013-07-29 15:27:15 -04:00
Colin Surprenant 498b16b2fe removed ruby bolt proxy class, JRubyBolt uses JRuby API directly, output collector optimization 2013-07-29 15:26:45 -04:00
Colin Surprenant 5147578e46 removed duplicated code 2013-07-29 15:21:58 -04:00
Colin Surprenant 4d7bf4879f bump to v0.6.6 2013-07-25 13:42:25 -04:00
Colin Surprenant 15c525410a cosmetic 2013-07-25 12:52:00 -04:00
Colin Surprenant 6f1854a6ee cleanup constants & environment 2013-07-24 23:07:03 -04:00
Colin Surprenant 2561064ee6 bump to v0.6.6.beta2 2013-07-20 11:56:00 -04:00
Colin Surprenant 378cabc4f3 issue #76 - avoid shelling out to storm jar command for cluster submission 2013-07-03 13:22:24 -04:00
Colin Surprenant bcfc5d2b5b replaced instance_exec with define_method 2013-06-29 19:09:05 -04:00
Colin Surprenant 22d5ed11d1 include jffi-native.jar in topology dependencies 2013-06-27 14:37:55 -04:00
Colin Surprenant c76fa6eef1 refactor and expose topology builder 2013-06-20 00:50:03 -04:00
Colin Surprenant 59093baf57 issue #82 - make configurable the javac source/target version 2013-06-18 15:02:10 -04:00
Colin Surprenant f2a0a7b7e8 version 0.6.6.beta1 2013-06-17 20:20:27 -04:00
Colin Surprenant 99b261f240 rake tasks cleanups & desc 2013-06-17 13:40:33 -04:00
Colin Surprenant d699c68b7a make travis moar happy 2013-06-14 02:04:50 -04:00
Colin Surprenant 28c9ca3009 issue #83 - add syntactic sugar to the Tuple class for more idiomatic Ruby Tuple usage in the DSL 2013-06-14 01:38:27 -04:00
Colin Surprenant 3d717383e9 issue #84 - remove simple from DSL classes and add DSL namespace 2013-06-14 01:37:09 -04:00
Colin Surprenant ef8fe5e24e cosmetic 2013-05-14 17:23:01 -04:00