-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support data compression in buffer plugins #1172
Support data compression in buffer plugins #1172
Conversation
3504bec
to
04daf34
Compare
04daf34
to
22c86e8
Compare
5208911
to
89c2a2c
Compare
@@ -149,11 +152,31 @@ def open(&block) | |||
raise NotImplementedError, "Implement this method in child class" | |||
end | |||
|
|||
def write_to(io) | |||
def write_to(io, options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use **kwargs
instead of tailing option = {}
.
I added review comments for implementations. |
66f8c18
to
72dd08c
Compare
@tagomoris |
if @chunk.is_a?(IO) | ||
# reset io(@chunk) to read | ||
@chunk.seek(0, IO::SEEK_SET) | ||
decompress('', io: @chunk) # not to call IO#read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying blank string for unused argument looks bad API.
Is there a way to use default value for that parameter? Or any other solution? (At least, nil
is better for unused parameter value.)
@tagomoris |
061b2de
to
71970b6
Compare
* to extend Decompressable
if @buffer.compress is true, then use `to_compressed_msgpack_stream`
* use **kwargs * not to call super
* change keyword argument `compress` -> `compressed`
* fix a typo and a bug
and fix resource string
3226342
to
ac376e1
Compare
@tagomoris |
ac376e1
to
0ed911a
Compare
Okay, LGTM! |
TODO
to_compressed_msgpack_stream
inEventStream
write_to
Not for this PR tasks
Close #1169