Modifications to scribe periodic rotations for file store

Hi,

The current periodic file rotations scheme provided by Scribe is very efficient. It works very well when you have single scribe server which is doing all the pushing. However, there is a slight problem with it when you employ multiple scribe server behind a load balancer to balance the load. At a time, the load balancer routes the data only through one scribe server but since the concerned category is configured on all the scribe servers, the other scribe servers will keep on doing the rotations and creates the 0 byte files in HDFS/file system. The less the intervals, the more the files will be created.

To solve this, I am attaching a patch which enables a new configuration directive "rotate_if_data" which allows scribe to perform periodic file rotations if and only if there are messages in buffer. If there are no messages, it will skip that rotation period. The default value for this configuration parameter is "false".

Please review it. If you'd like me to modify anything else or if there are any issues with it, please let me know.

Thanks,
Deepesh