Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
Currently I'm working on export HLog to another FileSystem, then I found the code of WALCellCodec and its related classes is not that clean. And there are several TODOs. Thus I tried to refactor the code based one these TODOs. e.g.
// TODO: it sucks that compression context is in WAL.Entry. It'd be nice if it was here. // Dictionary could be gotten by enum; initially, based on enum, context would create // an array of dictionaries. static class BaosAndCompressor extends ByteArrayOutputStream implements ByteStringCompressor { public ByteString toByteString() { // We need this copy to create the ByteString as the byte[] 'buf' is not immutable. We reuse // them. return ByteString.copyFrom(this.buf, 0, this.count); }
Attachments
Attachments
Issue Links
- links to