Added byte parsers and serializers to the JSON helper to avoid dumb byte -> string -> byte conversions when storing in HBase
Also added Final tags to the JSON methods
Added the MapRPC class to handle requests for mapping info
Updated RpcHandler to route to the new MapRPC class
Added the set of unique timeseries UIDs to TSDB for deriving maps and tracking new timeseries.
Stripped the metric, tagk, tagv and timeseries sets from the UniqueIdMap. It turns out that with tons of data in there, Jackson can eat up a lot of space and Java will fail to allocate enough RAM for a huge String object. To solve it permanently, the class should use the Jackson streaming methods. I'll have to look into how that would work with the HBase client. In the mean, it takes up MUCH less space in the database, less time to de/serialize the data if we just store the tagk/tagv pairs. Given the tagk/tagv pairs, we can derive the other maps using the new timeseries UID set list. So now, when a user requests a map like the metric UIDs, tagk UIDs, etc, it's derived.
Added UniqueId.getMetricFromKey() to get the metric UID from a raw row key
Added UniqueId.getTimestampFromKey() to extract the timestamp from a raw row key
Added UniqueId.getTagPairsFromKey() to get the list of tagk/tagv pairs from a raw row key
Added UniqueId.getTagksFromTagPairs() to get the list of tagk values from the tagk/tagv pairs set
Added UniqueId.getTagkvFromTagPairs() to get the list of tagv values from the tagk/tagv pairs set
Added UniqueId.getTSUIDFromKey() to get the timestamp UID from a raw row key, just strips the timestamp out
Fixed unhandled NoSuchUniqueId in UniqueId.getGeneralMeta()
Added UniqueId.putMap() to add the given UID value to the UID map if the object's unique ID could be found
Added UniqueId.flushMap() which will run through all UID maps in the object and flush anything that's changed to HBase
Added UniqueId.getMap() to retrieve a map from the UID hash map
Added UniqueId.getMapFromStorage() to get a map from HBase
Applied auto rule-based Eclipse formatting (from what Tsuna gave me) to UniqueId.java so a ton of lines shifted around
Applied auto rule-based Eclipse formatting (from what Tsuna gave me) to MetaData.java so a ton of lines shifted around
Added setters and properly formatted the getters for TimeSeriesMeta's first and last received fields
Added TimeSeriesMeta.getJSONBytes() to return the byte array instead of converting to a string
Fixed major bug in TsdbStore.putWithRetry() that has a lock in the parameter list where I wasn't passing the lock on to the underlying call
Added an abstract method setTable() to TsdbStore
Added some null checks for TsdbStoreHBase.putWithRetry()
Fixed TsdbStoreHBase.releaseRowLock() to check to see if the incoming lock object was null or not before trying to unlock again
Added TSDB.startManagementThreads() to let callers start the background management threads
Modified TSDB.flush() to kill the UID manager (TODO - need to make that optional) and flush the maps. Also need to flush meta eventually
Added the proper logger to TSDB
Added TSDB.synchronizeTSUIDs() which handles loading the timeseries UID list from storage, merging it with the one in memory and writing it back to storage atomically.
Added TSDB.processNewTSUID() that takes a new timeseries UID and updates all of the proper maps and metadata
Added a nested class, UIDManager, to TSDB that will handle background chores like flushing the maps to storage every so often if there are changes. It will also flush metadata in the future.
Modified TSDMain to start the management threads in the TSDB