MCPcopy
hub / github.com/OpenTSDB/opentsdb / delete

Method delete

src/meta/Annotation.java:212–223  ·  view source on GitHub ↗

Attempts to mark an Annotation object for deletion. Note that if the annoation does not exist in storage, this delete call will not throw an error. @param tsdb The TSDB to use for storage access @return A meaningless Deferred for the caller to wait on until the call is complete. The value may be nul

(final TSDB tsdb)

Source from the content-addressed store, hash-verified

210 * complete. The value may be null.
211 */
212 public Deferred<Object> delete(final TSDB tsdb) {
213 if (start_time < 1) {
214 throw new IllegalArgumentException("The start timestamp has not been set");
215 }
216
217 final byte[] tsuid_byte = tsuid != null && !tsuid.isEmpty() ?
218 UniqueId.stringToUid(tsuid) : null;
219 final DeleteRequest delete = new DeleteRequest(tsdb.dataTable(),
220 getRowKey(start_time, tsuid_byte), FAMILY,
221 getQualifier(start_time));
222 return tsdb.getClient().delete(delete);
223 }
224
225 /**
226 * Attempts to fetch a global annotation from storage

Callers 2

executeMethod · 0.95
callMethod · 0.45

Calls 6

stringToUidMethod · 0.95
getRowKeyMethod · 0.95
getQualifierMethod · 0.95
isEmptyMethod · 0.80
dataTableMethod · 0.80
getClientMethod · 0.45

Tested by

no test coverage detected