OpenTSDB/opentsdb — pull request #291 by jmangs (2014-02-28 01:45:38+00:00)
Title: Added support for deleting UID mappings

Right now there's no support built into the CLI tools to delete the UID mappings that show up when you run API commands like `suggest` and `query` - you can delete the data using `tsdb scan --delete` but the metrics will still come back in suggest and in queries (with no data if you delete it all). We have a bunch of old metrics which no longer have data, but they still show up in suggest - this becomes a pain in metrilyx because we can't show only pertinent metrics.

To address this, I've added a command called delete to `tsdb uid`:

`tsdb uid delete metrics sys.cpu.1` would delete the UID forward/reverse mappings for the specified UID. I'm not 100% sure how safe this is or how much data (if any) is left over but this let's you at least permanently remove it.

Note: Deleting the UID *before* cleaning up it's data means you cannot use the built in CLI commands like scan on the metric anymore. You will have to clean it up in HBase yourself, so be warned.

Anyways, this is just meant to be an administrative tool for cleaning up garbage like rename is. If there are any caveats to this approach it would be good to know as well.