MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / delete

Method delete

src/meta/UIDMeta.java:317–329  ·  view source on GitHub ↗

Attempts to delete the meta object from storage @param tsdb The TSDB to use for access to storage @return A deferred without meaning. The response may be null and should only be used to track completion. @throws HBaseException if there was an issue @throws IllegalArgumentException if data was missin

(final TSDB tsdb)

Source from the content-addressed store, hash-verified

315 * @throws IllegalArgumentException if data was missing (uid and type)
316 */
317 public Deferred<Object> delete(final TSDB tsdb) {
318 if (uid == null || uid.isEmpty()) {
319 throw new IllegalArgumentException("Missing UID");
320 }
321 if (type == null) {
322 throw new IllegalArgumentException("Missing type");
323 }
324
325 final DeleteRequest delete = new DeleteRequest(tsdb.uidTable(),
326 UniqueId.stringToUid(uid), FAMILY,
327 (type.toString().toLowerCase() + "_meta").getBytes(CHARSET));
328 return tsdb.getClient().delete(delete);
329 }
330
331 /**
332 * Convenience overload of {@code getUIDMeta(TSDB, UniqueIdType, byte[])}

Callers 1

handleUIDMetaMethod · 0.95

Calls 6

stringToUidMethod · 0.95
isEmptyMethod · 0.80
uidTableMethod · 0.45
getBytesMethod · 0.45
toStringMethod · 0.45
getClientMethod · 0.45

Tested by

no test coverage detected