Add deterministic upload mode#602
Merged
HenryCaiHaiying merged 1 commit intopinterest:masterfrom Mar 2, 2019
Merged
Conversation
Contributor
Author
|
I don't know if this fix is good to be upstreamed or if it's what the project wants, but it's what we're going to try for our installation. |
0e78c64 to
1143908
Compare
This is to avoid pinterest#600. In this mode, decisions about whether to upload files are *only* based on properties of the input messages themselves: timestamps and input message payload size. We don't care about real-world time, disk file timestamps, or log file size; we don't support upload on shutdown; and we check for uploads after every message. Configuration: - set secor.upload.deterministic=true - Configure at least one of secor.max.file.timestamp.range.millis and secor.max.input.payload.size.bytes. - If you've configured secor.max.file.timestamp.range.millis, you must set kafka.useTimestamp=true and ensure that your FileReader/FileWriter supports timestamps.
1143908 to
19dfa6f
Compare
Contributor
|
Looks good to me. I will merge in this PR, it's a good fix for secor. |
Contributor
|
@glasser - I was reading your code and trying to understand something. If deterministic mode only looks at the time difference in the message for that partition and the size of input for that partition wont you have the case where a partition only gets a handful of messages (never triggering the time or size criteria) and is never uploaded? Especially if you are splitting them up into smaller partitions using SplitByFieldMessageParter. |
Contributor
Author
|
That's probably correct, and should be mentioned in the docs for the option — open a PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to avoid #600.
In this mode, decisions about whether to upload files are only based on
properties of the input messages themselves: timestamps and input message
payload size. We don't care about real-world time, disk file timestamps, or log
file size; we don't support upload on shutdown; and we check for uploads after
every message.
Configuration:
secor.max.input.payload.size.bytes.
set kafka.useTimestamp=true and ensure that your FileReader/FileWriter
supports timestamps.