Thursday, December 11, 2014

Storm: Debugging topology running in storm cluster

Usually debugging is much easier when running storm topology in a local cluster, especially when it comes to command line output (e.g. "System.out.println()"). However, once the storm topology is deployed in a storm cluster. the command line output will longer be available. In such case, the logs created by storm becomes very useful as your command line output will be stored there. To this end, suppose you configure to have the storm logs stored in /var/storm-logs directory. and you want to view and continuously print out of command line just like what "System.out.println()" did in a local cluster. And suppose the logs is stored in a file named worker-6666.log. The easiest way to do this is to run the following commands:

> cd /var/storm-log
> tail -f worker-6666.log

The "tail -f" command will print out the last ten lines of the worker-6666.log continuously,

No comments:

Post a Comment