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

Docker Demo fails at Iceberg sync to Delta #392

Open
sagarlakshmipathy opened this issue Mar 22, 2024 · 5 comments · May be fixed by #422
Open

Docker Demo fails at Iceberg sync to Delta #392

sagarlakshmipathy opened this issue Mar 22, 2024 · 5 comments · May be fixed by #422
Assignees

Comments

@sagarlakshmipathy
Copy link
Contributor

code block

val icebergSourceClientProvider = new IcebergSourceClientProvider()
icebergSourceClientProvider.init(spark.sparkContext.hadoopConfiguration, Collections.emptyMap())
val icebergSourcePerTableConfig = PerTableConfigImpl.builder()
    .tableName(hudiTableName)
    .namespace(namespaceArray)
    .targetTableFormats(Arrays.asList(TableFormat.DELTA))
    .tableBasePath(hudiBasePath)
    .icebergCatalogConfig(icebergCatalogConfig)
    .syncMode(SyncMode.INCREMENTAL)
    .build()
oneTableClient.sync(icebergSourcePerTableConfig, icebergSourceClientProvider)

error:

java.lang.NoSuchMethodError: org.apache.spark.sql.delta.actions.AddFile.<init>(Ljava/lang/String;Lscala/collection/immutable/Map;JJZLjava/lang/String;Lscala/collection/immutable/Map;Lorg/apache/spark/sql/delta/actions/DeletionVectorDescriptor;)V
  org.apache.xtable.delta.DeltaDataFileUpdatesExtractor.createAddFileAction(DeltaDataFileUpdatesExtractor.java:118)
  org.apache.xtable.delta.DeltaDataFileUpdatesExtractor.lambda$applyDiff$3(DeltaDataFileUpdatesExtractor.java:99)
  java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
  java.util.Iterator.forEachRemaining(Iterator.java:116)
  java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
  java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
  java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
  java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:313)
  java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742)
  java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
  java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
  java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
  java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
  java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
  org.apache.xtable.delta.DeltaDataFileUpdatesExtractor.applyDiff(DeltaDataFileUpdatesExtractor.java:103)
  org.apache.xtable.delta.DeltaDataFileUpdatesExtractor.applySnapshot(DeltaDataFileUpdatesExtractor.java:78)
  org.apache.xtable.delta.DeltaClient.syncFilesForSnapshot(DeltaClient.java:184)
  org.apache.xtable.spi.sync.TableFormatSync.lambda$syncSnapshot$0(TableFormatSync.java:74)
  org.apache.xtable.spi.sync.TableFormatSync.getSyncResult(TableFormatSync.java:160)
  org.apache.xtable.spi.sync.TableFormatSync.syncSnapshot(TableFormatSync.java:70)
  org.apache.xtable.client.OneTableClient.syncSnapshot(OneTableClient.java:179)
  org.apache.xtable.client.OneTableClient.sync(OneTableClient.java:116)
  ammonite.$sess.cell7$Helper.<init>(cell7.sc:11)
  ammonite.$sess.cell7$.<init>(cell7.sc:7)
  ammonite.$sess.cell7$.<clinit>(cell7.sc:-1)
@kywe665
Copy link
Contributor

kywe665 commented Mar 22, 2024

+1 I also hit this

@ashvina
Copy link
Contributor

ashvina commented Mar 22, 2024

The issue might stem from the Delta version upgrade, which required an update to the Spark version as well (see commit). It seems that the demo code wasn't revised to reflect these changes at that time.

@sagarlakshmipathy
Copy link
Contributor Author

thats what i thought too, let me fix it this weekend.

@sagarlakshmipathy
Copy link
Contributor Author

can you assign it to me @ashvina

@ashvina
Copy link
Contributor

ashvina commented Mar 22, 2024

Thanks @sagarlakshmipathy
References to AddFile were fixed in the commit I mentioned above. Those changes may provide some hints about how to fix the demo.

@sagarlakshmipathy sagarlakshmipathy linked a pull request Apr 25, 2024 that will close this issue
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 a pull request may close this issue.

3 participants