Upgrade to Async 1.4.0

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify Deferred.group() callbacks to include a type due to the async library
template change in 1.3.3.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify UniqueId private variable names to conform to the rest of the source.
Fix up UniqueId unit tests for async

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Refactor the UID assignment process to be fully asynchronous.
This concludes the migration of the UniqueId code to provide
a completely non-blocking interface.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Start to convert the write path to be fully async.
We need to resolve the metric and tags asynchronously, so start to adapt
the code around the fast path for writes (not the one used for batch
imports) to expect to know what row to write to asynchronously.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Make the write path fully asynchronous.

Lookup or create all UIDs asynchronously, which was the last
step required to make the write path truly, fully asynchronous.
Previously the data point itself was written asynchronously,
but if we had a lot of new metrics or tags to create or lookup,
these were happening serially.

The net side effect of this change is that if multiple tags
need to be created for a single data point, they are now all
created concurrently.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix TeststTSDB.java and TestTsdbQuery.java for compatability with the new
async read/write path.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify TsdbQuery to run the query scanner asynchronously
Add Query.runAsync() method

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

This interface has never been useful and will eventually be removed.

Change-Id: Ie63411f17486074a4dd96829af09d172363cc1f2
Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Factor out a bit of UniqueId code.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add RowKey.metricNameAsync() to fetch the metric name asynchronously from a
row key

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add Tags.getTagsAsync() to resolve the tags asynchronously from a row key

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add async methods for all DataPoints implementations so that the full query
path can be converted to async code.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix TestTsdbQuery.java for async calls

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Update /api/query to run the data points queries asynchronously

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix up unit tests for async read/write changes

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