Add hash map to track in-flight UID assignments so that we avoid leaking UIDs
with the new async code.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Update NEWS for v2.0.0 RC1
Fix exception raised by missing map entries when fetching STATs for a TSD with
a new, empty uid table.
Close #215

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix debian package name typo

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add missing .joinUniterruptibly()'s to the TreeRPC calls that were preventing
some operations from completing properly. Closes #217.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix scanner table name in TreeSync.java so that it's looking at the meta data
table instead of the uid table.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix UidManager to pull the table name from the config class instead of only
using the command line argument. Closes #216

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
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>