Skip to content

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rsingh433 committed Feb 2, 2024
1 parent 65b3c74 commit 586261c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ private void requireSameSingle(TabletMetadata tabletMetadata, ColumnType type) {
}
break;
case FILES: {
// ELASTICITY_TODO compare values?
Condition c = SetEqualityIterator.createCondition(tabletMetadata.getFilesMap(), entry -> {
var stf = entry.getKey();
var dfv = entry.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,22 @@ public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean i
if (includeValue) {
byte[] ba = source.getTopKey().getColumnQualifierData().toArray();
byte[] valueData = source.getTopValue().get();

byte[] encodedData = encodeKeyValue(ba, valueData);

dos.writeInt(encodedData.length);
dos.write(encodedData, 0, encodedData.length);
}

else {

} else {
// only encode the key/qualifier
byte[] ba = source.getTopKey().getColumnQualifierData().toArray();
dos.writeInt(ba.length);
dos.write(ba, 0, ba.length);
}

source.next();
count++;
}

// The lenght is written last so that buffering can be avoided in this iterator.
dos.writeInt(count);

topValue = new Value(baos.toByteArray());
}

}

@Override
Expand Down Expand Up @@ -225,8 +216,4 @@ private static byte[] encodeKeyValue(byte[] key, byte[] value) {
return ByteUtils.concat(ByteUtils.escape(key), ByteUtils.escape(value));
}

// private static byte[] encodeEntry(Map.Entry<byte[],byte[]> bytesEntry) {
// return ByteUtils.concat(ByteUtils.escape(bytesEntry.getKey()),
// ByteUtils.escape(bytesEntry.getValue()));
// }
}

0 comments on commit 586261c

Please sign in to comment.