-
Notifications
You must be signed in to change notification settings - Fork 9
Remove redundant partition listing #328
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
WalkthroughThis PR updates two Scala files. In GroupBy.scala, the Changes
Possibly related PRs
Suggested reviewers
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions and Pipeline Checks: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| partitions | ||
| } catch { | ||
| case e: Exception => | ||
| logger.error(s"Failed to get partitions for table $tableName. " + |
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.
Based on the beacon datasets this is what I see when doing the 1st time backfill:
[36m2025/02/06 16:53:58 [m [1;31mERROR [m [32mTableUtils.scala:201 [m - Failed to get partitions for table etsy-zipline-dev.search.search_beacons_listing_actions. Either the table is not partitioned or the table is not reachable.
java.lang.UnsupportedOperationException: No partition column for table etsy-zipline-dev.search.search_beacons_listing_actions found.
at ai.chronon.integrations.cloud_gcp.BigQueryFormat.$anonfun$partitions$2(BigQueryFormat.scala:94) ~[cloud_gcp_lib_deploy.jar:?]
at scala.Option.getOrElse(Option.scala:189) ~[scala-library-2.12.18.jar:?]
at ai.chronon.integrations.cloud_gcp.BigQueryFormat.partitions(BigQueryFormat.scala:94) ~[cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.format.Format.primaryPartitions(Format.scala:27) ~[cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.format.Format.primaryPartitions$(Format.scala:18) ~[cloud_gcp_lib_deploy.jar:?]
at ai.chronon.integrations.cloud_gcp.BigQueryFormat.primaryPartitions(BigQueryFormat.scala:28) ~[cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.TableUtils.partitions(TableUtils.scala:187) [cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.TableUtils.unfilledRanges(TableUtils.scala:579) [cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.GroupBy$.computeBackfill(GroupBy.scala:716) [cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.Driver$GroupByBackfill$.run(Driver.scala:402) [cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.Driver$.main(Driver.scala:936) [cloud_gcp_lib_deploy.jar:?]
at ai.chronon.spark.Driver.main(Driver.scala) [cloud_gcp_lib_deploy.jar:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52) [spark-core_2.12-3.5.1.jar:3.5.1]
at [org.apache.spark.deploy.SparkSubmit.org](http://org.apache.spark.deploy.sparksubmit.org/)$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:1032) [spark-core_2.12-3.5.1.jar:3.5.1]
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:194) [spark-core_2.12-3.5.1.jar:3.5.1]
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:217) [spark-core_2.12-3.5.1.jar:3.5.1]
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:91) [spark-core_2.12-3.5.1.jar:3.5.1]
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1124) [spark-core_2.12-3.5.1.jar:3.5.1]
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1133) [spark-core_2.12-3.5.1.jar:3.5.1]
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) [spark-core_2.12-3.5.1.jar:3.5.1]Should we log the stacktrace at debug level? No strong opinions here
| val selects = Option(source.query.selects) | ||
| .map(_.toScala.map(keyValue => { | ||
| if (keyValue._2.contains(Constants.ChrononRunDs)) { | ||
| assert(intersectedRange.isDefined && intersectedRange.get.isSingleDay, |
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.
ooc why remove this?
## Summary The codebase previously operated under the assumption that partition listing is a cheap operation. It is not the case for GCS Format - partition listing is expensive on GCS external tables. ## Checklist - [ ] Added Unit Tests - [x] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling to provide clearer messaging when data retrieval issues occur. - **Refactor** - Streamlined internal processing for data partitions, resulting in more consistent behavior. - Enhanced logging during data scanning for easier troubleshooting. - Simplified logic for handling intersected ranges, ensuring consistent definitions. - Reduced the volume of test data for improved performance and resource utilization during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The codebase previously operated under the assumption that partition listing is a cheap operation. It is not the case for GCS Format - partition listing is expensive on GCS external tables. ## Checklist - [ ] Added Unit Tests - [x] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling to provide clearer messaging when data retrieval issues occur. - **Refactor** - Streamlined internal processing for data partitions, resulting in more consistent behavior. - Enhanced logging during data scanning for easier troubleshooting. - Simplified logic for handling intersected ranges, ensuring consistent definitions. - Reduced the volume of test data for improved performance and resource utilization during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The codebase previously operated under the assumption that partition listing is a cheap operation. It is not the case for GCS Format - partition listing is expensive on GCS external tables. ## Checklist - [ ] Added Unit Tests - [x] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling to provide clearer messaging when data retrieval issues occur. - **Refactor** - Streamlined internal processing for data partitions, resulting in more consistent behavior. - Enhanced logging during data scanning for easier troubleshooting. - Simplified logic for handling intersected ranges, ensuring consistent definitions. - Reduced the volume of test data for improved performance and resource utilization during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The codebase previously operated under the assumption that partition listing is a cheap operation. It is not the case for GCS Format - partition listing is expensive on GCS external tables. ## Checklist - [ ] Added Unit Tests - [x] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling to provide clearer messaging when data retrieval issues occur. - **Refactor** - Streamlined internal processing for data partitions, resulting in more consistent behavior. - Enhanced logging during data scanning for easier troubleshooting. - Simplified logic for handling intersected ranges, ensuring consistent definitions. - Reduced the volume of test data for improved performance and resource utilization during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The codebase previously operated under the assumption that partition listing is a cheap operation. It is not the case for GCS Format - partition listing is expensive on GCS external tables. ## Cheour clientslist - [ ] Added Unit Tests - [x] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling to provide clearer messaging when data retrieval issues occur. - **Refactor** - Streamlined internal processing for data partitions, resulting in more consistent behavior. - Enhanced logging during data scanning for easier troubleshooting. - Simplified logic for handling intersected ranges, ensuring consistent definitions. - Reduced the volume of test data for improved performance and resource utilization during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
The codebase previously operated under the assumption that partition listing is a cheap operation. It is not the case for GCS Format - partition listing is expensive on GCS external tables.
Checklist
Summary by CodeRabbit
Bug Fixes
Refactor