<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Changing StreamingWrite API in DBR 13.1 may lead to incompatibility with Spark 3.4 in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/changing-streamingwrite-api-in-dbr-13-1-may-lead-to/m-p/42793#M5722</link>
    <description>&lt;P&gt;I'm using StarRocks Connector[2] to ingest data to StarRocks on DataBricks 13.1 (powered by Spark 3.4.0). The connector could run on community Spark 3.4, but fail on the DBR. The reason is (the full stack trace is attached)&lt;/P&gt;&lt;PRE&gt;java.lang.IncompatibleClassChangeError: Conflicting default methods: org/apache/spark/sql/connector/write/BatchWrite.useCommitCoordinator org/apache/spark/sql/connector/write/streaming/StreamingWrite.useCommitCoordinator&lt;BR /&gt;    at com.starrocks.connector.spark.sql.write.StarRocksWrite.useCommitCoordinator(StarRocksWrite.java)&lt;BR /&gt;    at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.writeWithV2(WriteToDataSourceV2Exec.scala:431)&lt;BR /&gt;    at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.writeWithV2$(WriteToDataSourceV2Exec.scala:416)&lt;/PRE&gt;&lt;P data-unlink="true"&gt;&lt;A href="https://github.com/StarRocks/starrocks-connector-for-apache-spark/blob/main/src/main/java/com/starrocks/connector/spark/sql/write/StarRocksWrite.java#L33C17-L33C17" target="_self"&gt;StarRockWrite&lt;/A&gt;&amp;nbsp;implements both interface `BatchWrite` and `StreamingWrite`, and does not override default method `useCommitCoordinator` because only `BatchWrite` has the method in Spark 3.4. From the release note of DBR 13.1, I find it introduces&amp;nbsp;an improvement&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/SPARK-42968" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/SPARK-42968&lt;/A&gt;&amp;nbsp;which also adds the default method `useCommitCoordinator` to `StreamingWrite`, and there **bleep** be&amp;nbsp;default method conflict if&amp;nbsp;StarRockWrite&amp;nbsp;does not override the method. The improvement is introduced since Spark 3.5, but DBR 13.1 (powered by Spark 3.4.0) introduces it in advance, and that'**bleep** why the connector works well on community spark, and fail on DBR.&lt;BR /&gt;Is it a&amp;nbsp;compatibility issue between community spark and DBR? What is the right way to fix it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://docs.databricks.com/en/release-notes/runtime/13.1.html?_gl=1*uhpi3q*_gcl_au*NzExMTE3NDU4LjE2ODY3OTYyMjE.*_ga*NDAyNTc3MTY3LjE2Nzg3NzIxODg.*_ga_PQSEQ3RZQC*MTY5MzI5MzM5OS4yMS4xLjE2OTMyOTM5MjAuMjAuMC4w#databricks-runtime-131" target="_self"&gt;DBR 13.1 release note&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2] &lt;A href="https://github.com/StarRocks/starrocks-connector-for-apache-spark/pull/79" target="_self"&gt;StarRocks Connector&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 13:37:41 GMT</pubDate>
    <dc:creator>lpf</dc:creator>
    <dc:date>2023-08-29T13:37:41Z</dc:date>
    <item>
      <title>Changing StreamingWrite API in DBR 13.1 may lead to incompatibility with Spark 3.4</title>
      <link>https://community.databricks.com/t5/get-started-discussions/changing-streamingwrite-api-in-dbr-13-1-may-lead-to/m-p/42793#M5722</link>
      <description>&lt;P&gt;I'm using StarRocks Connector[2] to ingest data to StarRocks on DataBricks 13.1 (powered by Spark 3.4.0). The connector could run on community Spark 3.4, but fail on the DBR. The reason is (the full stack trace is attached)&lt;/P&gt;&lt;PRE&gt;java.lang.IncompatibleClassChangeError: Conflicting default methods: org/apache/spark/sql/connector/write/BatchWrite.useCommitCoordinator org/apache/spark/sql/connector/write/streaming/StreamingWrite.useCommitCoordinator&lt;BR /&gt;    at com.starrocks.connector.spark.sql.write.StarRocksWrite.useCommitCoordinator(StarRocksWrite.java)&lt;BR /&gt;    at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.writeWithV2(WriteToDataSourceV2Exec.scala:431)&lt;BR /&gt;    at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.writeWithV2$(WriteToDataSourceV2Exec.scala:416)&lt;/PRE&gt;&lt;P data-unlink="true"&gt;&lt;A href="https://github.com/StarRocks/starrocks-connector-for-apache-spark/blob/main/src/main/java/com/starrocks/connector/spark/sql/write/StarRocksWrite.java#L33C17-L33C17" target="_self"&gt;StarRockWrite&lt;/A&gt;&amp;nbsp;implements both interface `BatchWrite` and `StreamingWrite`, and does not override default method `useCommitCoordinator` because only `BatchWrite` has the method in Spark 3.4. From the release note of DBR 13.1, I find it introduces&amp;nbsp;an improvement&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/SPARK-42968" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/SPARK-42968&lt;/A&gt;&amp;nbsp;which also adds the default method `useCommitCoordinator` to `StreamingWrite`, and there **bleep** be&amp;nbsp;default method conflict if&amp;nbsp;StarRockWrite&amp;nbsp;does not override the method. The improvement is introduced since Spark 3.5, but DBR 13.1 (powered by Spark 3.4.0) introduces it in advance, and that'**bleep** why the connector works well on community spark, and fail on DBR.&lt;BR /&gt;Is it a&amp;nbsp;compatibility issue between community spark and DBR? What is the right way to fix it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://docs.databricks.com/en/release-notes/runtime/13.1.html?_gl=1*uhpi3q*_gcl_au*NzExMTE3NDU4LjE2ODY3OTYyMjE.*_ga*NDAyNTc3MTY3LjE2Nzg3NzIxODg.*_ga_PQSEQ3RZQC*MTY5MzI5MzM5OS4yMS4xLjE2OTMyOTM5MjAuMjAuMC4w#databricks-runtime-131" target="_self"&gt;DBR 13.1 release note&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2] &lt;A href="https://github.com/StarRocks/starrocks-connector-for-apache-spark/pull/79" target="_self"&gt;StarRocks Connector&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 13:37:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/changing-streamingwrite-api-in-dbr-13-1-may-lead-to/m-p/42793#M5722</guid>
      <dc:creator>lpf</dc:creator>
      <dc:date>2023-08-29T13:37:41Z</dc:date>
    </item>
  </channel>
</rss>

