Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Override BatchWrite#useCommitCoordinator to run on DataBricks 13.1 #79

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

banmoy
Copy link
Collaborator

@banmoy banmoy commented Aug 29, 2023

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Which issues of this PR fixes :

Fixes #

Problem Summary(Required) :

What's the problem

Running spark connector on DataBricks 13.1 (powered by Spark 3.4.0) will fail because of the below exception. The version of spark connector is 1.1.0.
image

How to solve it

DBR 13.1 is powered by Spark 3.4.0, but it also includes an additional improvement https://issues.apache.org/jira/browse/SPARK-42968. The improvement introduces a default method useCommitCoordinator in interface StreamingWrite. Because StarRocksWrite implements both interface BatchWrite and StreamingWrite which both have default method useCommitCoordinator on DBR 13.1, so it will leads default method conflict as the exception says. We could override the method in StarRocksWrite to solve it. see https://www.geeksforgeeks.org/resolving-conflicts-during-multiple-inheritance-in-java/.

This improvement is introduced since Spark 3.5, but DBR introduce it in advance, and that's why the connector can run on community Spark 3.4, but failed on DBR 13.1. It seems DBR is not completely compatible with the community Spark.

[1] DataBrick 13.1 release note

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
  • I have added documentation for my new feature or new function

…Bricks 13.1

Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
@banmoy banmoy merged commit d914368 into StarRocks:main Aug 31, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants