bk-mz opened a new pull request, #10459: URL: https://github.com/apache/iceberg/pull/10459
This pull request addresses the issue of class loader discrepancies when loading JAR files via the `spark-submit` command from remote locations (such as S3 or through Ivy). This discrepancy specifically impacts deployments on EMR clusters with the Iceberg feature enabled. Result of this [slack thread](https://apache-iceberg.slack.com/archives/C025PH0G1D4/p1711034217566819?thread_ts=1705849607.605659&cid=C025PH0G1D4) discussion. ### Description: When executing Spark jobs using the `spark-submit` command, JAR files loaded from remote locations (e.g., S3 or via Ivy) are placed into a different class loader known as `org.apache.spark.util.MutableURLClassLoader`. This class loader is a child class loader of the `AppClassLoader`. When enabling the EMR Iceberg flag, as described in the [AWS EMR documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-iceberg-use-spark-cluster.html), the Iceberg JAR file resides in the `AppClassLoader`. In contrast, user code (such as a metric reporter) is placed in the `MutableURLClassLoader`. Consequently, the Iceberg code can't access classes from the user code because the parent class loader (`AppClassLoader`) doesn't have visibility into the child class loader (`MutableURLClassLoader`) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
