-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Bound and measure BigQuery's Arrow buffer allocations #24777
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
Conversation
This helps bounding the memory allocations
plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryArrowBufferAllocator.java
Outdated
Show resolved
Hide resolved
plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryArrowAllocatorStats.java
Outdated
Show resolved
Hide resolved
ae701dd to
9b61f00
Compare
83f1ec0 to
f0afdf2
Compare
| } | ||
|
|
||
| @ConfigDescription("Maximum memory allocation allowed for Arrow library") | ||
| @Config("bigquery.arrow-serialization.max-allocation") |
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.
Dont we want to document this @wendigo ?
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.
We can but it's not obligatory.
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.
Seems too deep in the weeds .. lets leave it out until we find someone actually uses this for some benefit
| @Inject | ||
| public BigQueryArrowBufferAllocator(BigQueryArrowConfig config, BigQueryArrowAllocatorStats stats) | ||
| { | ||
| this.maximumAllocation = requireNonNull(config, "config is null").getMaxAllocation().toBytes(); |
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.
We avoid using requireNonNull for config classes. #13940
| import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; | ||
| import static io.airlift.units.DataSize.Unit.GIGABYTE; | ||
|
|
||
| class TestBigQueryArrowConfig |
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.
https://trino.io/docs/current/develop/tests.html#conventions-and-recommendations
Test classes should be defined as package-private and final.
| class TestBigQueryArrowConfig | ||
| { | ||
| @Test | ||
| public void testDefaults() |
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.
https://trino.io/docs/current/develop/tests.html#conventions-and-recommendations
Test methods should be defined as package-private.
Description
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: