MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / call

Method call

src/meta/TSUIDQuery.java:175–200  ·  view source on GitHub ↗
(final byte[] incoming_tsuid)

Source from the content-addressed store, hash-verified

173
174 class TSUIDCB implements Callback<Deferred<IncomingDataPoint>, byte[]> {
175 @Override
176 public Deferred<IncomingDataPoint> call(final byte[] incoming_tsuid)
177 throws Exception {
178 if (tsuid == null && incoming_tsuid == null) {
179 return Deferred.fromError(new RuntimeException("Both incoming and "
180 + "supplied TSUIDs were null for " + TSUIDQuery.this));
181 } else if (incoming_tsuid != null) {
182 setTSUID(incoming_tsuid);
183 }
184 if (back_scan < 1 && meta_enabled) {
185 final GetRequest get = new GetRequest(tsdb.metaTable(), tsuid);
186 get.family(TSMeta.FAMILY());
187 get.qualifier(TSMeta.COUNTER_QUALIFIER());
188 return tsdb.getClient().get(get).addCallbackDeferring(new MetaCB());
189 }
190
191 if (last_timestamp > 0) {
192 last_timestamp = Internal.baseTime(last_timestamp);
193 } else {
194 last_timestamp = Internal.baseTime(DateTime.currentTimeMillis());
195 }
196 final byte[] key = RowKey.rowKeyFromTSUID(tsdb, tsuid, last_timestamp);
197 final GetRequest get = new GetRequest(tsdb.dataTable(), key);
198 get.family(TSDB.FAMILY());
199 return tsdb.getClient().get(get).addCallbackDeferring(new LastPointCB());
200 }
201 @Override
202 public String toString() {
203 return "TSUID callback";

Callers

nothing calls this directly

Calls 12

FAMILYMethod · 0.95
COUNTER_QUALIFIERMethod · 0.95
baseTimeMethod · 0.95
currentTimeMillisMethod · 0.95
rowKeyFromTSUIDMethod · 0.95
FAMILYMethod · 0.95
metaTableMethod · 0.80
dataTableMethod · 0.80
setTSUIDMethod · 0.45
qualifierMethod · 0.45
getMethod · 0.45
getClientMethod · 0.45

Tested by

no test coverage detected