hmsonline / storm-cassandra

Storm Cassandra Integration
Apache License 2.0
180 stars 90 forks source link

Change to allow caller to set maximum element to drain from the queue #7

Closed binhnv closed 12 years ago

binhnv commented 12 years ago

Hi Goetz,

I made the change to implement this issue https://github.com/ptgoetz/storm-cassandra/issues/6 The change is to allow caller to be able to limit the maximum elements that he wants to drain from the queue so that he can avoid from out of memory issue when there are two many elements in the queue. My implementation is get this setting from Config object (The same as hosts and port...). If there is no setting for this parameter or the value is less than or equal zero then the API just behaves the same as it was before but if there is setting and the value is greater than zero then the API will drain up to the limit of elements from the queue. Can you please check and let me know if you have any concern?

Thanks Binh

ptgoetz commented 12 years ago

Looks good. Thanks!