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
This commit is contained in:
parent
7f0b8a5520
commit
a0249a7d7a
|
@ -19,7 +19,7 @@ apply plugin: 'java'
|
|||
apply plugin: 'com.github.jruby-gradle.jar'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
version = '0.9.0'
|
||||
version = '0.9.1'
|
||||
group = 'com.github.jruby-gradle'
|
||||
description = "RedStorm integrates Ruby code via JRuby into the Storm distributed computation system"
|
||||
defaultTasks 'check', 'assemble'
|
||||
|
|
|
@ -11,6 +11,12 @@ module RedStorm
|
|||
BASE_PATH = File.expand_path(launch_path + '/..')
|
||||
REDSTORM_HOME = BASE_PATH
|
||||
GEM_PATH = "#{REDSTORM_HOME}/gems/"
|
||||
# Make sure that when we're loading our environment up that we properly set
|
||||
# up the embedded JRuby environment:
|
||||
# <https://github.com/jruby-gradle/redstorm/issues/12>
|
||||
Dir.chdir('uri:classloader:/')
|
||||
ENV['JARS_HOME'] = 'uri:classloader:/jars'
|
||||
$LOAD_PATH.unshift('uri:classloader://')
|
||||
else
|
||||
BASE_PATH = CWD
|
||||
REDSTORM_HOME = File.expand_path(launch_path + '/../..')
|
||||
|
|
Loading…
Reference in New Issue