Inspect all the forced class casting in the repo
- Dominant language
- Java
- Stars
- 6.2k
- Forks
- 2.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 111
Description
Currently we see a few type casting errors in a few places:
{code:java}
org.apache.hudi.common.table.timeline.versioning.v2.CommitMetadataSerDeV2.deserialize(CommitMetadataSerDeV2.java:88)
at org.apache.hudi.common.table.timeline.HoodieTimeline.readNonEmptyInstantContent(HoodieTimeline.java:153)
at org.apache.hudi.common.table.timeline.HoodieTimeline.readRollbackPlan(HoodieTimeline.java:244)
at org.apache.hudi.metadata.HoodieTableMetadataUtil.getRollbackedCommits(HoodieTableMetadataUtil.java:2034)
... 30 more
Caused by: java.lang.ClassCastException: class org.apache.avro.generic.GenericData$Record cannot be cast to class org.apache.avro.specific.SpecificRecordBase (org.apache.avro.generic.GenericData$Record and org.apache.avro.specific.SpecificRecordBase are in unnamed module of loader 'app'){code}
The reason is some JDK releases does now allow type coersion for instantces from different classloaders,
see issue https://github.com/apache/hudi/issues/13410 for more details.
## JIRA info
- Link: https://issues.apache.org/jira/browse/HUDI-9573
- Type: Improvement
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the reported failure at CommitMetadataSerDeV2.java:88 and the related context in HoodieTimeline.java:153 and :244. Compare the forced casts involved with the classloader coercion issue linked in the report; the issue does not specify a test or define what changes should be made, so clarify the expected outcome before starting implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100