-
Notifications
You must be signed in to change notification settings - Fork 593
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
rptest/datalake: test metadata interoperability with 3rd party system #24643
base: dev
Are you sure you want to change the base?
rptest/datalake: test metadata interoperability with 3rd party system #24643
Conversation
6f1f148
to
6e607dd
Compare
Retry command for Build#60089please wait until all jobs are finished before running the slash command
|
CI test resultstest results on build#60089
test results on build#60100
test results on build#60178
|
1292bb1
to
6e1e926
Compare
def run_sample_maintenance_task(self, namespace, table) -> None: | ||
# Metadata query | ||
# https://iceberg.apache.org/docs/1.6.1/spark-queries/#files | ||
initial_parquet_files = self.run_query_fetch_one( | ||
f"SELECT count(*) FROM {namespace}.{table}.files")[0] | ||
|
||
# Want at least 2 files to be able to assert that optimization did something. | ||
assert initial_parquet_files >= 2, f"Expecting at least 2 files, got {initial_parquet_files}" | ||
|
||
# Spark Procedures provided by Iceberg SQL Extensions | ||
# https://iceberg.apache.org/docs/1.6.1/spark-procedures/#rewrite_data_files | ||
self.run_query_fetch_one( | ||
f"CALL `redpanda-iceberg-catalog`.system.rewrite_data_files(\"{namespace}.{table}\")" | ||
) | ||
|
||
optimized_parquet_files = self.run_query_fetch_one( | ||
f"SELECT count(*) FROM {namespace}.{table}.files")[0] | ||
assert optimized_parquet_files < initial_parquet_files, f"Expecting fewer files after optimize, got {optimized_parquet_files}" |
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.
IMO these service classes should only hold operations, not validations. To that end, can we split this into some count_parquet_files()
and optimize_parquet_files()
? There are many different kinds of maintenance https://iceberg.apache.org/docs/1.5.1/maintenance/ and it'll be much easier to reuse if we're more descriptive and have smaller, tighter primitives.
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.
@andrwng I see what you mean but here I wanted to give more freedom to these maintenance tasks implementation, i.e. it might as well be a metadata only maintenance. I documented the expectations in the code doc
def run_sample_maintenance_task(self, namespace, table) -> None: |
optimize_parquet_files
and count_parquet_files
would work for the 2 engines we have now, do you reckon all of them expose the same primitives so that we could have a single test for all of them?
Will be used for testing interoperability with 3rd party vendors.
4b21a17
to
92f74aa
Compare
Retry command for Build#60178please wait until all jobs are finished before running the slash command
|
Backports Required
Release Notes