Add tsd.core.meta.enable_tsuid_tracking config setting as an efficiency option
over tsd.core.meta.enable_tsuid_incrementing.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add code to let users choose to PUT a 1 in the TSUID table every time a data
point is written instead of incrementing as an efficiency option for busy TSDs
over TSUID incrementing. AtomicIncrements can quickly OOM a TSD whereas Puts
are much more efficient. The downside is that we can't generate TSMeta objects
in real-time, but a batch scanner can easily handle that. We also don't get a
count of the data points inserted, but we still get the last time a point was
written.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix #228 introduced by variable length encoding where integer values stored on
single bytes in HBase were being cast to unsigned ints in
RowSeq.extractIntegerValue. Removed the bitmask and now single bytes are
returned correctly.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add unit tests for writing negative values and VLE integers through TSDB

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.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>
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>
Fix the init script for Debian.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>