Hi Everyone
I did a slight change in the aggregation example's core.clj code. I encapsulated the code block from 'onyx.api/submit-job' till the end in a function and supplied that in the :main in project.clj and performed a lein run. I got the following output:
Window extent {:window/id :word-counter, :window/task :count-words, :window/type :global, :window/aggregation :onyx.windowing.aggregation/count, :aggregate/record #object[onyx.windowing.window_extensions.GlobalWindow 0x7d8c45df "onyx.windowing.window_extensions.GlobalWindow@7d8c45df"], :aggregate/init #object[onyx.windowing.aggregation$count_aggregation_fn_init 0x6ed994e2 "onyx.windowing.aggregation$count_aggregation_fn_init@6ed994e2"], :aggregate/fn #object[onyx.windowing.aggregation$count_aggregation_fn 0x16411313 "onyx.windowing.aggregation$count_aggregation_fn@16411313"], :aggregate/super-agg-fn #object[onyx.windowing.aggregation$count_super_aggregation 0x7a7dda37 "onyx.windowing.aggregation$count_super_aggregation@7a7dda37"], :aggregate/apply-state-update #object[onyx.windowing.aggregation$set_value_aggregation_apply_log 0xd45fea3 "onyx.windowing.aggregation$set_value_aggregation_apply_log@d45fea3"]}, [{:trigger/window-id :word-counter, :trigger/refinement :accumulating, :trigger/on :segment, :trigger/threshold [5 :elements], :trigger/sync :aggregation.core/dump-window!, :trigger/id #uuid "ac733dd1-9241-7ad6-0fd8-fd9f36ac5057", :trigger/sync-fn #'aggregation.core/dump-window!} - {:window-id 1, :lower-bound -Infinity, :upper-bound Infinity, :context :new-segment}] contents: {"name" 1, "Coffee" 1, "Om" 1, "to" 1, "cold" 1}
Window extent {:window/id :word-counter, :window/task :count-words, :window/type :global, :window/aggregation :onyx.windowing.aggregation/count, :aggregate/record #object[onyx.windowing.window_extensions.GlobalWindow 0x7d8c45df "onyx.windowing.window_extensions.GlobalWindow@7d8c45df"], :aggregate/init #object[onyx.windowing.aggregation$count_aggregation_fn_init 0x6ed994e2 "onyx.windowing.aggregation$count_aggregation_fn_init@6ed994e2"], :aggregate/fn #object[onyx.windowing.aggregation$count_aggregation_fn 0x16411313 "onyx.windowing.aggregation$count_aggregation_fn@16411313"], :aggregate/super-agg-fn #object[onyx.windowing.aggregation$count_super_aggregation 0x7a7dda37 "onyx.windowing.aggregation$count_super_aggregation@7a7dda37"], :aggregate/apply-state-update #object[onyx.windowing.aggregation$set_value_aggregation_apply_log 0xd45fea3 "onyx.windowing.aggregation$set_value_aggregation_apply_log@d45fea3"]}, [{:trigger/window-id :word-counter, :trigger/refinement :accumulating, :trigger/on :segment, :trigger/threshold [5 :elements], :trigger/sync :aggregation.core/dump-window!, :trigger/id #uuid "ac733dd1-9241-7ad6-0fd8-fd9f36ac5057", :trigger/sync-fn #'aggregation.core/dump-window!} - {:window-id 1, :lower-bound -Infinity, :upper-bound Infinity, :context :new-segment}] contents: {"Mike" 1, "cold" 1, "coffee's" 1, "new" 1, "cup" 1, "Om" 1, "name" 1, "Coffee" 1, "to" 1, "get" 1}
Window extent {:window/id :word-counter, :window/task :count-words, :window/type :global, :window/aggregation :onyx.windowing.aggregation/count, :aggregate/record #object[onyx.windowing.window_extensions.GlobalWindow 0x7d8c45df "onyx.windowing.window_extensions.GlobalWindow@7d8c45df"], :aggregate/init #object[onyx.windowing.aggregation$count_aggregation_fn_init 0x6ed994e2 "onyx.windowing.aggregation$count_aggregation_fn_init@6ed994e2"], :aggregate/fn #object[onyx.windowing.aggregation$count_aggregation_fn 0x16411313 "onyx.windowing.aggregation$count_aggregation_fn@16411313"], :aggregate/super-agg-fn #object[onyx.windowing.aggregation$count_super_aggregation 0x7a7dda37 "onyx.windowing.aggregation$count_super_aggregation@7a7dda37"], :aggregate/apply-state-update #object[onyx.windowing.aggregation$set_value_aggregation_apply_log 0xd45fea3 "onyx.windowing.aggregation$set_value_aggregation_apply_log@d45fea3"]}, [{:trigger/window-id :word-counter, :trigger/refinement :accumulating, :trigger/on :segment, :trigger/threshold [5 :elements], :trigger/sync :aggregation.core/dump-window!, :trigger/id #uuid "ac733dd1-9241-7ad6-0fd8-fd9f36ac5057", :trigger/sync-fn #'aggregation.core/dump-window!} - {:window-id 1, :lower-bound -Infinity, :upper-bound Infinity, :context :new-segment}] contents: {"nom" 2, "Mike" 1, "cold" 1, "is" 1, "coffee's" 1, "new" 1, "cup" 1, "Om" 1, "name" 1, "a" 1, "Coffee" 1, "to" 1, "get" 1, "Time" 1}
Window extent {:window/id :word-counter, :window/task :count-words, :window/type :global, :window/aggregation :onyx.windowing.aggregation/count, :aggregate/record #object[onyx.windowing.window_extensions.GlobalWindow 0x7d8c45df "onyx.windowing.window_extensions.GlobalWindow@7d8c45df"], :aggregate/init #object[onyx.windowing.aggregation$count_aggregation_fn_init 0x6ed994e2 "onyx.windowing.aggregation$count_aggregation_fn_init@6ed994e2"], :aggregate/fn #object[onyx.windowing.aggregation$count_aggregation_fn 0x16411313 "onyx.windowing.aggregation$count_aggregation_fn@16411313"], :aggregate/super-agg-fn #object[onyx.windowing.aggregation$count_super_aggregation 0x7a7dda37 "onyx.windowing.aggregation$count_super_aggregation@7a7dda37"], :aggregate/apply-state-update #object[onyx.windowing.aggregation$set_value_aggregation_apply_log 0xd45fea3 "onyx.windowing.aggregation$set_value_aggregation_apply_log@d45fea3"]}, [{:trigger/window-id :word-counter, :trigger/refinement :accumulating, :trigger/on :segment, :trigger/threshold [5 :elements], :trigger/sync :aggregation.core/dump-window!, :trigger/id #uuid "ac733dd1-9241-7ad6-0fd8-fd9f36ac5057", :trigger/sync-fn #'aggregation.core/dump-window!} - {:window-id 1, :lower-bound -Infinity, :upper-bound Infinity, :context :new-segment}] contents: {"nom" 3, "Mike" 1, "cold" 1, "is" 1, "coffee's" 1, "new" 1, "cup" 1, "coffee" 2, "Om" 1, "name" 1, "My" 2, "a" 1, "Coffee" 1, "to" 1, "get" 1, "Time" 1}
So I guess the example is sort of working fine.