@Test public void fixQualifierFlags() throws Exception { ArrayList<KeyValue> kvs = new ArrayList<KeyValue>(2); final byte[] qual1 = { 0x00, 0x03 }; final byte[] val1 = Bytes.fromLong(4L); final byte[] cqual1 = { 0x00, 0x07 }; kvs.add(makekv(qual1, val1)); final byte[] qual2 = { 0x00, 0x17 }; final byte[] val2 = Bytes.fromLong(5L); kvs.add(makekv(qual2, val2)); compactionq.compact(kvs); verify(tsdb, times(1)).put(KEY, concat(cqual1, qual2), concat(val1, val2, ZERO)); verify(tsdb, times(1)).delete(KEY, new byte[][] { qual1, qual2 }); }
private static byte fixQualifierFlags(byte flags, final int val_len) { return (byte) ((flags & ~(Const.FLAGS_MASK >>> 1)) | (val_len - 1)); }
CompactionQueue extends ConcurrentSkipListMap<byte[], Boolean> { private static byte fixQualifierFlags(byte flags, final int val_len) { return (byte) ((flags & ~(Const.FLAGS_MASK >>> 1)) | (val_len - 1)); } }
CompactionQueue extends ConcurrentSkipListMap<byte[], Boolean> { private static byte fixQualifierFlags(byte flags, final int val_len) { return (byte) ((flags & ~(Const.FLAGS_MASK >>> 1)) | (val_len - 1)); } CompactionQueue(final TSDB tsdb); }
CompactionQueue extends ConcurrentSkipListMap<byte[], Boolean> { private static byte fixQualifierFlags(byte flags, final int val_len) { return (byte) ((flags & ~(Const.FLAGS_MASK >>> 1)) | (val_len - 1)); } CompactionQueue(final TSDB tsdb); @Override int size(); void add(final byte[] row); Deferred<ArrayList<Object>> flush(); }
CompactionQueue extends ConcurrentSkipListMap<byte[], Boolean> { private static byte fixQualifierFlags(byte flags, final int val_len) { return (byte) ((flags & ~(Const.FLAGS_MASK >>> 1)) | (val_len - 1)); } CompactionQueue(final TSDB tsdb); @Override int size(); void add(final byte[] row); Deferred<ArrayList<Object>> flush();  }