Update TestHttpQuery with refactored code and proper tests
Add api version fields to HttpQuery
Add HttpQuery.getQueryBaseRoute() to calculate what RPC module to route the
request to
Simplify HttpQuery.explodePath()

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add version to the BuildData.java file so we can print out the OpenTSDB version,
not just the git hash
Modify version RPC call to return the OpenTSDB version and use the JSON helper class for JSON formatting

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Extend BadRequestException.java with HTTP status code and details
Add HttpSerializer abstract class for serializer plugins
Add HttpJsonSerializer default implementation of HttpSerializer
Add DummyHttpSerializer.java for plugin testing
Add serializer_map_content_type and query_string hash maps for serializer
mapping
Add HttpQuery.setSerializer() to determine what serializer to use based on the
query string or content type
Add HttpQuery.InitialiizeSerializerMap() to scan the class path for serializer
implementations, should be called once per tsd
Modify the PipelineFactory constructor to initialize the serializer maps
Split out SuggestRpc into it's own file
Added "api/suggest" route
RpcHandler for HTTP requests now passes BadRequestExceptions to the serializer
Add tsd.http_show_stack_trace config option
Add method shortcut to HttpQuery since the API RPCs will need to check it
Add method checks to the api/serializers and api/suggest endpoints
Fix up TestHttpQuery with mocking required to initialize the HttpQuery object
Add TestSuggestRpc.java
Add TestHttpJsonSerializer
Fix assertEquals calls in TestHttpQuery where the expected value should appear
first
Add a number of unit tests to TestHttpQuery that now cover everything except
the HTML formatting calls

fixes

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add "max" query parameter to SuggestRpc calls that lets users specify the number of results returned.
JAVA API remains unchanged.
closes #147

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Implement api/aggregators endpoint
Implement api/version endpoint
Implement api/dropcaches endpoint
Fix comments in HttpSerializer format methods
Fix error handlers in HttpSerializer where, if the user does not supply a jsonp
callback function, it was still wrapping the response in parentheses

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add configurable support for chunked HTTP requests via the
 tsd.http.request.enable_chunked config parameter
Add tsd.http.request.max_chunk to allow changing the max chunk size
Implement /api/put to store datapoints over HTTP
Add TestPutRpc that unit tests many possible HTTP inputs
Add parsePutV1() to serializer
Add formatPutV1() to serializer
Add NettyMocks.postQuery() overload for providing a common Content-Type

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add JSONException.java class to wrap the different Jackson exceptions as per
Tsuna's request
Refactor the TestJSON unit tests for cleaner code and handle the new exception
class
Add constructors to BadRequestException.java to wrap source exceptions

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>