storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitchell Rathbun (BLOOMBERG/ 731 LEX)" <mrathb...@bloomberg.net>
Subject Re:Initialization in Storm before Deserialization
Date Fri, 19 Jan 2018 23:40:33 GMT
After some more digging, I believe the answer to this is to implement IWorkerHook and register
the resulting class using TopologyBuilder.addWorkerHook().

From: user@storm.apache.org At: 01/18/18 19:47:27To:  user@storm.apache.org
Subject: Re:Initialization in Storm before Deserialization

I guess a possible way to do this would be to implement ITaskHook and register the class using
the topology.auto.task.hooks config. However, this interface doesn't provide a hook for the
open method present in Spout objects, so it wouldn't really work. So two questions: Why doesn't
ITaskHook provide a method for open()? And are there any other ways to initialize various
services/threads/singletons before spout/bolt deserialization?

From: user@storm.apache.org At: 01/18/18 15:51:50To:  user@storm.apache.org
Subject: Initialization in Storm before Deserialization

Does Storm provide any mechanism to initialize services or threads before any Bolts and Spouts
are deserialized in Cluster Mode? Or is the only mechanism to do this from within open()/prepare()?


Mime
View raw message