-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Spout to accept a metric registration function #60
Conversation
@@ -29,19 +29,23 @@ trait BaseSpout[+T] extends BaseRichSpout with Spout[T] { self => | |||
|
|||
var collector: SpoutOutputCollector = null | |||
|
|||
override def registerMetrics(metrics: () => TraversableOnce[Metric[_]]) = | |||
override def registerMetricHandlers(metrics: () => TraversableOnce[Metric[_]], rf: TopologyContext => Unit) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to be an def openHook(fn: => TopologyContext => Unit)
* Passes metrics to register with storm and a function to run on the storm runtime context | ||
* when the spout is opened. | ||
*/ | ||
def openHook(fn: => TopologyContext => Unit) = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong? as did the old one. Why is the function defined rather than being abstract? or a sys.error at the least
Minor thing, other than that LGTM |
8db991e
to
f187d5d
Compare
Tested this branch internally, all looks good for merge. |
Spout to accept a metric registration function
This is needed for Summingbird platform-independent counters to work. We need to pass a function that registers the metrics with the StormStatProvider that the counters use.