Mergeback

Hi

we work on this libs and found several issues which we could fix

First, there are some issues with duration and rates calculation. see the changes in src/main/java/com/github/sps/metrics/OpenTsdbReporter.java. We need to call convertRate or convertDuration before we send them to opentsdb. You can check log4j reporter (http://metrics.codahale.com/manual/core/#man-core-reporters-slf4j) source codes for another example of how we should calculate the rate/duration correctly

Second, there are some issues with opentsdb accepting large http requests (say, 20-50 metrics in one request). There are two options, one is to enabled http chunked request in opentsdb servers and change our libs to use chunked http request. The other one is to split up the big requests into smaller requests as we did here. In this patch we provide an options to limit the number of metrics to send in each request and split up the requests according to this limits

Thanks
James Shao