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 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>
Added an "m=metric{tagk1=tagv1,...}" style query parameter to the
/api/uid/tsmeta endpoint. Allows for retrieving the TSMeta of a time series
without knowing the TSUID, only be specifying the timeseries using the
metric and tags.
Enabled creation of TSMeta objects via POST by metric and tags. Needs to be
enabled explicitly by create=true flag in the URL. If specified creates
both a TSMeta object and initializes the counter.

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

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>
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>