to_s cast on getValue and max_task_parallelism in cluster
This commit is contained in:
parent
91f58b3bd0
commit
246a4ec7e1
|
@ -14,7 +14,7 @@ module RedStorm
|
||||||
class RedisWordSpout < RedStorm::SimpleSpout
|
class RedisWordSpout < RedStorm::SimpleSpout
|
||||||
output_fields :word
|
output_fields :word
|
||||||
|
|
||||||
on_send {@q.pop if @q.size > 0}
|
on_send {@q.pop.to_s if @q.size > 0}
|
||||||
|
|
||||||
on_init do
|
on_init do
|
||||||
@q = Queue.new
|
@q = Queue.new
|
||||||
|
@ -51,6 +51,7 @@ module RedStorm
|
||||||
when :local
|
when :local
|
||||||
max_task_parallelism 3
|
max_task_parallelism 3
|
||||||
when :cluster
|
when :cluster
|
||||||
|
max_task_parallelism 5
|
||||||
num_workers 20
|
num_workers 20
|
||||||
max_spout_pending(1000);
|
max_spout_pending(1000);
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ module RedStorm
|
||||||
# block declaration style using auto-emit (default)
|
# block declaration style using auto-emit (default)
|
||||||
#
|
#
|
||||||
on_receive do |tuple|
|
on_receive do |tuple|
|
||||||
word = tuple.getString(0)
|
word = tuple.getValue(0).to_s
|
||||||
@counts[word] += 1
|
@counts[word] += 1
|
||||||
|
|
||||||
[word, @counts[word]]
|
[word, @counts[word]]
|
||||||
|
|
Loading…
Reference in New Issue