Will-Lo opened a new pull request, #3787: URL: https://github.com/apache/gobblin/pull/3787
Dear Gobblin maintainers, Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below! ### JIRA - [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR" - https://issues.apache.org/jira/browse/GOBBLIN-1918 ### Description - [ ] Here are some details about my PR, including screenshots (if applicable): The GobblinOrcWriter contains a converter and a buffer rowbatch. The buffer holds the converted Avro -> Orc records before adding them to the native orc writer. Since it can contain multiple records, it constantly needs to resize the columns of the rowbatch in order to hold multiple records. This problem affects both performance and memory when resizing is done either too often (enlarge factor is too low) or not often enough (enlarge factor is too high and thus the buffer dominates the container memory). Because there is a bounded number of records that can persist in the buffer before getting flushed, we want to reduce the aggressiveness of the resizing algorithm the more records that have been processed. This PR proposes changing the smart resizing algorithm to be a *exponential decay algorithm*, where it is bounded between some max and a min. Given the default values, it will converge to the min at around ~500 records. The logic here is that after a rowbatch is saturated, it is very unlikely that it needs to be resized significantly, otherwise a record with large arrays can cause the rowbatch to grow out of bounds and cause OOM. So when the row batch approaches saturation, we want to decrease the amount we are resizing by. ### Tests - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason: ### Commits - [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)": 1. Subject is separated from body by a blank line 2. Subject is limited to 50 characters 3. Subject does not end with a period 4. Subject uses the imperative mood ("add", not "adding") 5. Body wraps at 72 characters 6. Body explains "what" and "why", not "how" -- 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]
