amrishlal opened a new pull request, #9324:
URL: https://github.com/apache/hudi/pull/9324

   ### Change Logs
   
   In PR #9001 `JsonUtils.java` was modified to explicitly register 
JavaTimeModule into Json `ObjectMapper` class. After this change running 
integration tests (see command below) started throwing `Caused by: 
java.lang.NoClassDefFoundError: 
org/apache/hudi/com/fasterxml/jackson/datatype/jsr310/JavaTimeModule`
   
   This PR fixes shading of `jsr310` in `hudi-integ-test-bundle` to get rid of 
the `NoClassDefFoundError`.
   
   **Command being used to run integration test**
   ```
   ./bin/spark-submit \
   --packages org.apache.spark:spark-avro_2.12:3.3.2 \
   --jars file:////Users/amrish/jars/jackson-datatype-jsr310-2.10.0.jar \
   --conf spark.task.cpus=1 \
   --conf spark.executor.cores=1 \
   --conf spark.task.maxFailures=100 \
   --conf spark.memory.fraction=0.4  \
   --conf spark.rdd.compress=true  \
   --conf spark.kryoserializer.buffer.max=2000m \
   --conf spark.serializer=org.apache.spark.serializer.KryoSerializer \
   --conf spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar \
   --conf spark.memory.storageFraction=0.1 \
   --conf spark.shuffle.service.enabled=true  \
   --conf spark.sql.hive.convertMetastoreParquet=false  \
   --conf spark.driver.maxResultSize=12g \
   --conf spark.executor.heartbeatInterval=120s \
   --conf spark.network.timeout=600s \
   --conf spark.yarn.max.executor.failures=10 \
   --conf spark.sql.catalogImplementation=hive \
   --class org.apache.hudi.integ.testsuite.HoodieTestSuiteJob 
/Users/amrish/code/amrish-hudi-3/packaging/hudi-integ-test-bundle/target/hudi-integ-test-bundle-0.14\
   .0-SNAPSHOT.jar \
   --source-ordering-field test_suite_source_ordering_field \
   --use-deltastreamer \
   --target-base-path /tmp/hudi/output \
   --input-base-path /tmp/hudi/input \
   --target-table table1 \
   --props file:///Users/amrish/junk/test-aggressive-clean-archival.properties \
   --workload-yaml-path 
file:///Users/amrish/code/amrish-hudi-3/docker/demo/config/test-suite/simple-deltastreamer.yaml
 \
   --schemaprovider-class 
org.apache.hudi.integ.testsuite.schema.TestSuiteFileBasedSchemaProvider \
   --source-class org.apache.hudi.utilities.sources.AvroDFSSource \
   --input-file-size 125829120 \
   --workload-generator-classname 
org.apache.hudi.integ.testsuite.dag.WorkflowDagGenerator \
   --table-type COPY_ON_WRITE \
   --compact-scheduling-minshare 1 \
   --clean-input \
   --clean-output
   
   ```
   
   **Exception being thrown**
   ```
   Caused by: java.lang.NoClassDefFoundError: 
org/apache/hudi/com/fasterxml/jackson/datatype/jsr310/JavaTimeModule
        at 
org.apache.hudi.common.util.JsonUtils.registerModules(JsonUtils.java:63)
        at 
org.apache.spark.sql.adapter.BaseSpark3Adapter.<init>(BaseSpark3Adapter.scala:51)
        at 
org.apache.spark.sql.adapter.Spark3_3Adapter.<init>(Spark3_3Adapter.scala:46)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at 
org.apache.hudi.SparkAdapterSupport$.sparkAdapter$lzycompute(SparkAdapterSupport.scala:49)
   ```
   
   ### Impact
   
   _Describe any public API or user-facing feature change or any performance 
impact._
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the 
risks._
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, 
config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the 
default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. 
Please create a Jira ticket, attach the
     ticket number here and follow the 
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to 
make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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]

Reply via email to