AFAIK submitTopology submits the JAR to Nimbus which is then loaded to each worker, so it is run only once, and not on each worker.
We use a dummy bolt's prepare method for that. Not sure what is the "correct" way of doing it. Itai ________________________________ From: Alex Zuzin <[email protected]> Sent: Wednesday, November 5, 2014 10:43 AM To: [email protected] Subject: Once-per JVM init? Hi all! Am I correct to assume that "submitTopology" is executed once per JVM and is a good place to init resources that require once-per-JVM initialization? If not, is there such a spot (it needs to have access to Storm config)? If yes, where? :) Thank you! -- "If you can't conceal it seamlessly, expose it vigorously"
