vinishjail97 commented on code in PR #843: URL: https://github.com/apache/incubator-xtable/pull/843#discussion_r3617964237
########## .github/workflows/spark-runtime-validation.yml: ########## @@ -0,0 +1,85 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Spark Runtime Bundle Validation + +# Validates the shaded xtable-spark-runtime bundle end-to-end: ITXTableSparkRuntimeBundle +# spark-submits the bundled jar against a real Spark distribution for one case per direction +# across Hudi, Iceberg and Delta. The IT self-skips unless SPARK_HOME is set, so the main CI +# never exercises it; this workflow installs a matching Spark 3.4 distro and runs it. + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !contains(github.ref, 'main') }} + +# Runs on every push/PR to the covered branches (no path filter) so the check always +# reports — required status checks that never trigger leave a PR blocked on a pending check. +on: + push: + branches: + - "main" + - "branch-0.4" + + pull_request: + branches: + - "main" + - "branch-0.4" + + workflow_dispatch: + +env: + SPARK_VERSION: "3.4.3" Review Comment: Quick follow-up on this: Spark 3.5 is now supported. In caa2227f a Delta source/target auto-switches to the Spark-free Delta Kernel on Spark 3.5+ (delta-core stays the default on 3.4), so the sync runs on both lines. A single --usedeltakernel flag can force it on any version. Thanks again for pushing on this. ########## .github/workflows/spark-runtime-validation.yml: ########## @@ -0,0 +1,85 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Spark Runtime Bundle Validation + +# Validates the shaded xtable-spark-runtime bundle end-to-end: ITXTableSparkRuntimeBundle +# spark-submits the bundled jar against a real Spark distribution for one case per direction +# across Hudi, Iceberg and Delta. The IT self-skips unless SPARK_HOME is set, so the main CI +# never exercises it; this workflow installs a matching Spark 3.4 distro and runs it. + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !contains(github.ref, 'main') }} + +# Runs on every push/PR to the covered branches (no path filter) so the check always +# reports — required status checks that never trigger leave a PR blocked on a pending check. +on: + push: + branches: + - "main" Review Comment: Follow-up: the workflow now runs a matrix on both Spark 3.4.3 and 3.5.9 (caa2227f) rather than a single pinned version, now that 3.5 is supported via the Delta Kernel. Appreciate the nudge here. ########## xtable-spark-runtime/pom.xml: ########## @@ -0,0 +1,382 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.xtable</groupId> + <artifactId>xtable</artifactId> + <version>0.2.0-SNAPSHOT</version> + </parent> + + <artifactId>xtable-spark-runtime_${scala.binary.version}</artifactId> + <name>XTable Project Spark Runtime</name> + <description> + Thin, relocated, drop-in Spark bundle that runs incremental XTable metadata sync. v1 ships + the standalone spark-submit entry point (XTableSparkSync); the config-only, driver-side + QueryExecutionListener on-ramp is a planned follow-up (see rfc/rfc-3). + </description> + + <dependencies> + <!-- XTable engine (bundled) --> + <dependency> + <groupId>org.apache.xtable</groupId> + <artifactId>xtable-core_${scala.binary.version}</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- Command-line parsing for the standalone XTableSparkSync entry point (bundled). --> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + </dependency> + + <!-- Logging API (lombok @Log4j2); provided by the cluster runtime --> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>provided</scope> + </dependency> + + <!-- Spark: provided by the cluster. Brings QueryExecutionListener, QueryExecution, + Catalyst LogicalPlan, and SparkSession. --> + <dependency> + <groupId>org.apache.spark</groupId> + <artifactId>spark-sql_${scala.binary.version}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- Hadoop: provided by the cluster. --> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + <scope>provided</scope> + </dependency> + + <!-- + Engine libraries (Hudi / Iceberg / Delta) are provided, not bundled: the user brings their + own engine version and the thin bundle stays compatible across versions (see the shade + plugin below). Hudi is supplied as the hudi-spark bundle, whose regenerated DecimalWrapper + links cleanly on Avro >=1.10; raw hudi-common's Avro-1.8/1.9-generated model classes + reference org.apache.avro.data.TimeConversions.TimeConversion, removed in Avro 1.10 and thus + absent from the Avro 1.12 that Iceberg 1.9.2 requires. + --> + <dependency> + <groupId>org.apache.hudi</groupId> + <artifactId>hudi-spark${spark.version.prefix}-bundle_${scala.binary.version}</artifactId> + <scope>provided</scope> + </dependency> + <!-- + XTable's Hudi TARGET writes via the Java client (HoodieJavaEngineContext), which the Spark Review Comment: Follow-up: added a source-to-target format matrix and spark-submit examples to the docs in apache/incubator-xtable#847 (a Run XTable on Apache Spark page plus a module README). Thank you for the suggestion. ########## rfc/rfc-3/rfc-3.md: ########## @@ -0,0 +1,234 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +# RFC-3: xtable-spark-runtime - in-job metadata sync via a thin Spark bundle + +## Proposers + +- @vinishjail97 + +## Approvers +- Anyone from the XTable community can approve/add feedback. + +## Status Review Comment: One more update for the thread: pushed caa2227f adding Spark 3.5 support (Delta via the Spark-free Delta Kernel, auto-selected on 3.5+), with the bundle IT now running on a Spark 3.4 and 3.5 CI matrix. Docs and a module README follow in apache/incubator-xtable#847. Thank you again for the thorough review. -- 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]
