Skip to content

Commit

Permalink
Found real cause of colinsurprenant#7.
Browse files Browse the repository at this point in the history
Look like java_import was introducing a class overwrite for 'Config',
when `rbconfig` needed to be used (Config::CONFIG), the error would surface.

rbconfig is used with rack utils.
  • Loading branch information
jondot committed May 19, 2012
1 parent 36ee6bc commit c921ca2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/red_storm/simple_topology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Configurator
attr_reader :config

def initialize
@config = Config.new
@config = Backtype::Config.new
end

def method_missing(sym, *args)
Expand Down Expand Up @@ -173,4 +173,4 @@ def self.underscore(camel_case)
camel_case.to_s.split('::').last.gsub(/(.)([A-Z])/,'\1_\2').downcase!
end
end
end
end
6 changes: 5 additions & 1 deletion lib/red_storm/topology_launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
require 'red_storm'
end

java_import 'backtype.storm.Config'
# see https://github.com/colinsurprenant/redstorm/issues/7
module Backtype
java_import 'backtype.storm.Config'
end

java_import 'backtype.storm.LocalCluster'
java_import 'backtype.storm.StormSubmitter'
java_import 'backtype.storm.topology.TopologyBuilder'
Expand Down

1 comment on commit c921ca2

@colinsurprenant
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!! wonder if we shouldn't just namespace all backtype.storm classes. This would make the code more clear upon using a storm class and avoid any other potential name clash.

Please sign in to comment.