You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/01 06:45:05 UTC

[GitHub] [hudi] easonwood opened a new issue, #6563: [SUPPORT] ClassNotFound when using Customized Payload Class in 0.11

easonwood opened a new issue, #6563:
URL: https://github.com/apache/hudi/issues/6563

   --------------------------------------
   
   public class OrderlyMergeRecordPayload extends OverwriteWithLatestAvroPayload {
       public OrderlyMergeRecordPayload(GenericRecord record, Comparable orderingVal) {
           super(record, orderingVal);
       }
       public OrderlyMergeRecordPayload(Option<GenericRecord> record) {
           this(record.isPresent() ? record.get() : null, 0); // natural order
       }
       public Option<IndexedRecord> combineAndGetUpdateValue(IndexedRecord currentValue, Schema schema, Properties properties) throws IOException {
           ...
       }
   }
   -------------------------------------
   I am using this customized payload class.
   And add configuration to hudiOptions:
      HoodieWriteConfig.WRITE_PAYLOAD_CLASS -> classOf[OrderlyMergeRecordPayload].getName
   Finally save dataframe to hudi:
      someDataFrame
         .write
         .format("org.apache.hudi")
         .options(hudiOptions)
   --------------------------------------
   
   This task runs successfully on hudi 0.8
   But got this error on hudi 0.11
   
   Caused by: java.io.IOException: Could not create payload for class: us.zoom.op.utils.OrderlyMergeRecordPayload
   	at org.apache.hudi.DataSourceUtils.createPayload(DataSourceUtils.java:138)
   	at org.apache.hudi.DataSourceUtils.createHoodieRecord(DataSourceUtils.java:235)
   	at org.apache.hudi.HoodieSparkSqlWriter$.$anonfun$write$9(HoodieSparkSqlWriter.scala:275)
   	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
   	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
   	at org.apache.spark.util.collection.ExternalSorter.insertAll(ExternalSorter.scala:199)
   	at org.apache.spark.shuffle.sort.SortShuffleWriter.write(SortShuffleWriter.scala:65)
   	at org.apache.spark.shuffle.ShuffleWriteProcessor.write(ShuffleWriteProcessor.scala:59)
   	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:99)
   	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:52)
   	at org.apache.spark.scheduler.Task.run(Task.scala:133)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:506)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1474)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:509)
   	... 3 more
   Caused by: org.apache.hudi.exception.HoodieException: Unable to load class
   	at org.apache.hudi.common.util.ReflectionUtils.getClass(ReflectionUtils.java:57)
   	at org.apache.hudi.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:89)
   	at org.apache.hudi.DataSourceUtils.createPayload(DataSourceUtils.java:135)
   	... 16 more
   Caused by: java.lang.ClassNotFoundException: us.zoom.op.utils.OrderlyMergeRecordPayload
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   	at java.lang.Class.forName0(Native Method)
   	at java.lang.Class.forName(Class.java:264)
   	at org.apache.hudi.common.util.ReflectionUtils.getClass(ReflectionUtils.java:54)
   	... 18 more
   
   
   
   
   
   


-- 
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: commits-unsubscribe@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] easonwood closed issue #6563: [SUPPORT] ClassNotFound when using Customized Payload Class in 0.11

Posted by GitBox <gi...@apache.org>.
easonwood closed issue #6563: [SUPPORT] ClassNotFound when using Customized Payload Class in 0.11
URL: https://github.com/apache/hudi/issues/6563


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] easonwood commented on issue #6563: [SUPPORT] ClassNotFound when using Customized Payload Class in 0.11

Posted by GitBox <gi...@apache.org>.
easonwood commented on issue #6563:
URL: https://github.com/apache/hudi/issues/6563#issuecomment-1239027976

   Fixed by remove hudi-spark-bundle jar from spark classpath


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] Zouxxyy commented on issue #6563: [SUPPORT] ClassNotFound when using Customized Payload Class in 0.11

Posted by GitBox <gi...@apache.org>.
Zouxxyy commented on issue #6563:
URL: https://github.com/apache/hudi/issues/6563#issuecomment-1236083453

   may you can see [#6543](https://github.com/apache/hudi/issues/6543)


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org