I notice the storm.js base classes initialize with some storm config
definition.
We have some python bolts that pull storm config info defined in the
topology like this:
class SomeBolt (storm.BasicBolt):
def _configure(self, stormconf):
self.some_param = stormconf.get('some.param', DEFAULT_VALUE)
...
def initialize(self, stormconf, context):
self._configure(stormconf)
How to do the same for node.js? (Asking as I'm so far the lone node.js
storm user at my organization).
I'm thinking something like below, but I could be mistaken. Please
confirm/clarify, thanks.
SomeBolt.prototype = Object.create(BasicBolt.prototype);
SomeBolt.prototype.constructor = SomeBolt;
function SomeBolt(conf) {
BasicBolt.call(this);
this.someParam = conf.someParam; //or conf['someParam']
};