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

Method call

src/core/Internal.java:476–494  ·  view source on GitHub ↗

Returns the last data point from a data row in the TSDB table. @param row The row from HBase @return null if no data was found, a data point if one was

(final ArrayList<KeyValue> row)

Source from the content-addressed store, hash-verified

474 * @return null if no data was found, a data point if one was
475 */
476 public IncomingDataPoint call(final ArrayList<KeyValue> row)
477 throws Exception {
478 if (row == null || row.size() < 1) {
479 return null;
480 }
481
482 // check to see if the cells array is empty as it will flush out all
483 // non-data points.
484 final ArrayList<Cell> cells = extractDataPoints(row, row.size());
485 if (cells.isEmpty()) {
486 return null;
487 }
488 final Cell cell = cells.get(cells.size() - 1);
489 final IncomingDataPoint dp = new IncomingDataPoint();
490 final long base_time = baseTime(tsdb, row.get(0).key());
491 dp.setTimestamp(getTimestampFromQualifier(cell.qualifier(), base_time));
492 dp.setValue(cell.parseValue().toString());
493 return dp;
494 }
495 }
496
497 /**

Callers

nothing calls this directly

Calls 12

setTimestampMethod · 0.95
qualifierMethod · 0.95
setValueMethod · 0.95
parseValueMethod · 0.95
extractDataPointsMethod · 0.80
isEmptyMethod · 0.80
sizeMethod · 0.65
baseTimeMethod · 0.65
keyMethod · 0.65
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected