fix check_tsd -c/-w options logic

it should fail only if both are None, not the other way around

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
accept HTTP 202 as success

opentsdb v2 returns 202 when asked for datapoints

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Fix bug in JSON query that throws a Null pointer exception when a user does
not supply a tags map. TSSubQuery.getTags() will now return an empty map instead
of a null if the tags were not set.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add toString() overrides to TSQuery and TSSubQuery for debugging purposes

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Catch and handle user input errors in QueryRpc properly when validating the
query. Previously they were being returned as 500s. Also prints out the
query at a debug level.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix long integer calculation bug in DateTime.parseDuration()

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix /api/suggest to return the exact max param values instead of one greater.
Closes #238

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Allow for empty query strings in the /api/suggest endpoint so that users can
fetch all metrics/tags

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix bug where the serializer for Tree objects was not parsing out the "enabled"
flag. Closes #239

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Change UniqueId.pending_assignments to a regular HashMap since we are syncing
on the map's monitor when calling get/put

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix redundant cast in TestTsdbQuery

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix TestTreeRpc unit tests where JSON ordering is in-determinant.

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

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix TestSuggestRpc by removing tests for the missing "q" parameter which may
be omitted to get a list of the top names for a type

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix TreeRpc to parse out the "definition" flag from a JSON request to delete a
tree so that the definition may be removed. Closes #241

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Merge branch 'next' into next_lastdp