-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to upload last seen offset onto ZK to solve the determini…
…stic upload problem mentioned in #600 When there was a failed attempt uploading for this topic partition, we might end up on S3 with: // s3n://topic/partition/day/hour=0/offset1 // s3n://topic/partition/day/hour=1/offset1 If this attempty eventually failed and we resume the processing on another node, we might end up with the following upload if the upload was triggered too early because time based upload policy: // might have less files to upload, e.g. // localfs://topic/partition/day/hour=0/offset1 // If we continue uploading, we will upload this file: // s3n://topic/partition/day/hour=0/offset1 // But the next file to be uploaded will become: // s3n://topic/partition/day/hour=1/offset2 // So we will end up with 2 different files for hour=1/ We should wait a bit longer to have at least getting to the same offset as ZK's Added config property secor.upload.last.seen.offset to support the following upload sequence: 1. acquire ZK lock for the current topic/partition --- new ---> 1.1 check whether the in-memory lastSeenOffset >= ZK's lastSeenOffset, if not skip the rest; --- new ---> 1.2 persist the in-memory lastSeenOffset onto ZK lastSeenOffsetPath 2. upload a list of files for the current topic/partition 3. persist the current offset to ZK committedOffset path 4. release ZK lock
- Loading branch information
Henry Cai
committed
May 26, 2020
1 parent
cae002d
commit 31e7f20
Showing
6 changed files
with
152 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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