@Override public void prepare(Map conf, TopologyContext context, OutputCollector collector) { // Add the Storm Config and the context as is, in case any PubSubs need it. config.set(BulletStormConfig.STORM_CONFIG, conf); config.set(BulletStormConfig.STORM_CONTEXT, context); this.collector = collector; try { this.publisher = createPublisher(); } catch (PubSubException e) { throw new RuntimeException("Cannot create PubSub instance or a Publisher for it.", e); } }
@Override public void prepare(Map conf, TopologyContext context, OutputCollector collector) { // Add the Storm Config and the context as is, in case any PubSubs need it. config.set(BulletStormConfig.STORM_CONFIG, conf); config.set(BulletStormConfig.STORM_CONTEXT, context); this.collector = collector; try { this.publisher = createPublisher(); } catch (PubSubException e) { throw new RuntimeException("Cannot create PubSub instance or a Publisher for it.", e); } }