Add SearchPlugin abstract class
Add SearchPlugin unit test implementation

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add tsd.search.enable and tsd.search.plugin config option defaults
Add tsd.core.plugin_path config default

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add search object to TSDB
Add TSDB.indexTSMeta() and .indexUIDMeta() to access the search object
Add delete TSUID and UID search calls to TSDB
Add TSDB.initializePlugins() to load plugins and toss exceptions AFTER
construction of the TSDB
Add TestTSDB initialize plugins UTs

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add search index and delete calls to UniqueIdRpc so that the index is updated
when the user makes a modification
Update Unit tests to verify the search method was called

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add UniqueId.getTSUIDFromKey() to parse TSUIDs from an HBase row key

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add "tsd.core.meta.enable_tracking" config option, defaults to false

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add TSMeta.metaExistsInStorage() to determine if a meta object exists
Add TSMeta.incrementAndGetCounter() to use atomic counters for tracking
timeseries as per Tsuna
Add TSMeta constructor that stores a given created timestamp
Add TSMeta.storeNew() that stores a new timeseris meta object without syncs
Fix possible issues to avoid corrupted storage data for TSMeta objects
Add total_dps field and getter to TSMeta
Change TSMeta.QUALIFIER to META_QUALIFER and add COUNTER_QUALIFIER to
differentiate between the columns
Fix TSMeta to throw an exception if a user tries to modify an entry that does
not exist instead of creating one
Modify TSMeta.getFromStorage() to load the last_received and total datapoints
from storage
Replace TSMeta.copyToStorageObject() with getStorageJSON() to serialize only
the fields we want to the data store

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add UIDMeta.storeNew() to create a new object
Add UIDmeta.setCreated() as we may need to override when syncing past timeseries
Add logging ignores to TestUIDMeta

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add TSDB reference to UniqueId for the UIDMeta creation calls with a setter so
we don't have to modify the constructor
Add UniqueIdType field to UniqueId
Modify UniqueId to create the UIDMeta when assigning a UID if enabled by the
user

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Replace NoSuchUniqueName catches with NoSuchUniqueId in UniqueIdRpc UID calls, was a bug
Refactor TestUniqueIdRpc tests so setups are only called where necessary

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add call to TSMeta.incrementAndGetCounter() in TSDB if meta tracking is enabled
Add call to UniqueId.setTSDB() if meta tracking is enabled

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add TSMeta.counterExistsInStorage() to determine if the counter exists

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add uid metasync CLI command to generate meta data from existing data for use
in upgrading to 2.0. The command also updates the "created" timestamp and
attempts to fix corrupted meta data

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Fix bug in UniqueId when assigning new UIDs if the tsdb has not been set

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add support for TSUID queries to Query and TsdbQuery. It is fully backwards
compatible. If a list of tsuids is provided, the metric/tags are ignored.
Otherwise the query behaves as usual. A row key regex is built to return only
the rows matching the TSUID. All TSUIDs in the list must share the same metric
and their data will be aggregated together.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify TSSubQuery to use a generic List for TSUIDs
Modify TSQuery to supply the list of TSUIDs to a TsdbQuery if given

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Update QueryRpc to accept TSUID queries

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify UniqueId to fetch names and suggestions asynchronously.

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add MockBase.java, a mock implementation of HBase used for unit testing.
It uses nested hash tables to store keys as hex encoding strings with
byte arrays as the value. It does not currently support timestamps or
multiple versions. The asyncbase client is mocked with the following:
GetRequest
DeleteRequest
PutRequest
CompareAndSet
Scanner (limited to row regex and always returns the entire result in
  the first call)
AtomicIncrementRequest

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Modify all storage calls in TSMeta and UIDMeta to be asynchronous along with
all unit tests and callers
Update TSDB.getUidName() to use the asynchronous name call
Modify UniqueIdRpc to access TSMeta and UIDMeta asynchronously, though the RPCs
could still be asynced when responding to the client.

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