Re: Questions about cleanup() and logging.

777 views
Skip to first unread message

Lakshmanan

unread,
Oct 24, 2012, 6:16:17 PM10/24/12
to storm...@googlegroups.com
My understanding is the log4j properties file in storm installation will be used when deployed to the cluster. You can still use log.info in your project to write to the log files. They would be written to the worker-logs file in the supervisor nodes.


On Wednesday, October 24, 2012 9:00:39 AM UTC-7, MitchBit wrote:
Hi!

First of all thanks a lot to the devs for this awesome framework. However, I have a few questions:

I know, theres no guarantee of cleanup() being called in cluster-mode, but what are the chances? Is it more like "usually" or "barely ever"? Is it (usually/barelt/whatever) called, when running "storm kill" from nimbus or is it also possible to call "killTopology" method from within the main of the topology code? (Is the latter a good idea or rather a "no-go"?)

Second, in the jar-bundled project I configure log4j to use fileappender - will this jar-contained config be used when deploying the topology? Or will the log4j properties file in storm installation /storm/storm-0.8.1/log4j be used?

Basically, I'd like to use log.info to write some figures to the logs when cleanup() is called - how can this be done?

MitchBit

unread,
Oct 25, 2012, 7:53:48 AM10/25/12
to storm...@googlegroups.com
Thanks - but I am not 100% sure about that as in my project's log4j.xml I set a file appender to create a folder and file for logging. The folder and file are created, but empty.

Can anybody say anything about the cleanup() method and whether how reliable it is?

Nathan Marz

unread,
Oct 25, 2012, 3:49:37 PM10/25/12
to storm...@googlegroups.com
cleanup is never called on the cluster, just in local mode. 


On Thu, Oct 25, 2012 at 4:53 AM, MitchBit <kurtcob...@hotmail.com> wrote:
Thanks - but I am not 100% sure about that as in my project's log4j.xml I set a file appender to create a folder and file for logging. The folder and file are created, but empty.

Can anybody say anything about the cleanup() method and whether how reliable it is?




--
Twitter: @nathanmarz
http://nathanmarz.com

Nathan Marz

unread,
Oct 26, 2012, 2:22:40 AM10/26/12
to storm...@googlegroups.com
It's impossible to guarantee on a cluster. It's intended for cleanup in local mode so that you can bring up and tear down topologies over and over in unit tests. Potentially in the future we can make a best effort attempt to call it on the cluster.

On Thu, Oct 25, 2012 at 2:50 PM, Gino <lbus...@gmail.com> wrote:
Man... that is a useless API to have then. I take it that this is planned for future work. Can you somehow send all the bolts a message to properly do cleanup?
Reply all
Reply to author
Forward
0 new messages