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

Method twoCellAppend

test/core/TestCompactionQueue.java:303–322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301 }
302
303 @Test
304 public void twoCellAppend() throws Exception {
305 ArrayList<KeyValue> kvs = new ArrayList<KeyValue>(1);
306 ArrayList<Annotation> annotations = new ArrayList<Annotation>(0);
307 final byte[] qual = { 0x00, 0x07 };
308 final byte[] val = Bytes.fromLong(42L);
309 final byte[] qual2 = { 0x00, 0x17 };
310 final byte[] val2 = Bytes.fromLong(5L);
311 kvs.add(makekv(AppendDataPoints.APPEND_COLUMN_QUALIFIER,
312 MockBase.concatByteArrays(qual, val, qual2, val2)));
313 final KeyValue kv = compactionq.compact(kvs, annotations, null);
314 assertArrayEquals(MockBase.concatByteArrays(qual, qual2), kv.qualifier());
315 assertArrayEquals(MockBase.concatByteArrays(val, val2, ZERO), kv.value());
316
317 // We had nothing to do so...
318 // ... verify there were no put.
319 verify(tsdb, never()).put(anyBytes(), anyBytes(), anyBytes(), anyLong());
320 // ... verify there were no delete.
321 verify(tsdb, never()).delete(anyBytes(), any(byte[][].class));
322 }
323
324 @Test
325 public void twoCellRowWAnnotation() throws Exception {

Callers

nothing calls this directly

Calls 9

makekvMethod · 0.95
concatByteArraysMethod · 0.95
anyBytesMethod · 0.95
putMethod · 0.80
addMethod · 0.45
compactMethod · 0.45
qualifierMethod · 0.45
valueMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected