apurtell commented on code in PR #2540:
URL: https://github.com/apache/phoenix/pull/2540#discussion_r3500529683
##########
phoenix-core-server/src/main/java/org/apache/phoenix/replication/log/LogFileCodec.java:
##########
@@ -26,55 +26,56 @@
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.client.Delete;
-import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.io.ByteBuffInputStream;
import org.apache.hadoop.hbase.nio.ByteBuff;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.io.WritableUtils;
/**
- * Default Codec for encoding and decoding ReplicationLog Records within a
block buffer. This
- * implementation uses standard Java DataInput/DataOutput for serialization.
Record Format within a
- * block:
+ * Default Codec for encoding and decoding ReplicationLog Records within a
block buffer. The on-disk
Review Comment:
This is the most interesting change (to me). I suppose it's of a piece with
the evolution of HBase WAL with WALEdit to group cells and on the RPC side
"cell blocks" instead of individually described cells in the IDL.
It was probably inevitable that this grouping was necessary to bring down
overheads but I wanted to go with simple and atomic first if we could get away
with it.
We may want to restructure the ascii art here further
```text
RECORD LENGTH (vint)
RECORD HEADER
Table name length (vint)
Table name bytes
Commit id (vlong)
ATTRIBUTES COUNT (vint) -- NEW: record-level attribute map
PER-ATTRIBUTE (repeated):
Key length (vint)
Key bytes (UTF-8)
Value length (vint)
Value bytes
CELL COUNT (vint)
PER-CELL (repeated):
Row length (vint) -- row written on EVERY cell
Row bytes
Family length (vint) -- family written on EVERY cell
Family bytes
Qualifier length (vint)
Qualifier bytes
Cell timestamp (long, 8 bytes)
Cell type byte (1 byte)
Value length (vint)
Value bytes
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]