base_time = (timestamp - (timestamp % Const.MAX_TIMESPAN));
}
Bytes.setInt(row, (int) base_time, metrics.width());
scheduleForCompaction(row, (int) base_time);
final PutRequest point = new PutRequest(table, row, FAMILY, qualifier, value);
// TODO(tsuna): Add a callback to time the latency of HBase and store the
// timing in a moving Histogram (once we have a class for this).
Deferred<Object> result = client.put(point);
if (!config.enable_realtime_ts() && !config.enable_tsuid_incrementing() &&
!config.enable_tsuid_tracking() && rt_publisher == null) {
return result;
}
final byte[] tsuid = UniqueId.getTSUIDFromKey(row, METRICS_WIDTH,
Const.TIMESTAMP_BYTES);
// for busy TSDs we may only enable TSUID tracking, storing a 1 in the
// counter field for a TSUID with the proper timestamp. If the user would
// rather have TSUID incrementing enabled, that will trump the PUT
if (config.enable_tsuid_tracking() && !config.enable_tsuid_incrementing()) {
final PutRequest tracking = new PutRequest(meta_table, tsuid,
TSMeta.FAMILY(), TSMeta.COUNTER_QUALIFIER(), Bytes.fromLong(1));
client.put(tracking);
} else if (config.enable_tsuid_incrementing() || config.enable_realtime_ts()) {
TSMeta.incrementAndGetCounter(TSDB.this, tsuid);
}