-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BUG] Can not instantiate LogStore
class: io.delta.storage.HDFSLogStore
#3299
Labels
bug
Something isn't working
Comments
abhishekrb19
added a commit
to abhishekrb19/incubator-druid
that referenced
this issue
Jun 24, 2024
With the upgrade to Kernel 3.2.0, the Druid Delta connector extension isn't able to ingest from Delta tables successfully. Please see delta-io/delta#3299 The underlying problem seems to be coming from https://github.com/delta-io/delta/blob/master/kernel/kernel-defaults/src/main/java/io/delta/kernel/defaults/internal/logstore/LogStoreProvider.java#L99 This patch is a workaround to setting the thread class loader explictly. The Kernel community may consider a fix in the next release as it's affected another connector as well.
abhishekrb19
added a commit
to abhishekrb19/incubator-druid
that referenced
this issue
Jun 24, 2024
With the upgrade to Kernel 3.2.0, the Druid Delta connector extension isn't able to ingest from Delta tables successfully. Please see delta-io/delta#3299 The underlying problem seems to be coming from https://github.com/delta-io/delta/blob/master/kernel/kernel-defaults/src/main/java/io/delta/kernel/defaults/internal/logstore/LogStoreProvider.java#L99 This patch is a workaround to setting the thread class loader explictly. The Kernel community may consider a fix in the next release as it's affected another connector as well.
3 tasks
Hi @abhishekrb19, I think we can just use the Let me know if you want to make a PR to remove those. |
abhishekrb19
added a commit
to abhishekrb19/delta
that referenced
this issue
Jun 24, 2024
vkorukanti
pushed a commit
that referenced
this issue
Jun 24, 2024
…3304) ## Description Look for the `LogStore` class more broadly in the class loader than just the thread local's class loader. The thread context class loader requires the Thread local variables to have the `LogStore` in it, but this class loader may not have all the dependencies wired up. ## How was this patch tested? Not tested yet. Fixes #3299.
abhishekrb19
added a commit
to apache/druid
that referenced
this issue
Jun 25, 2024
… Delta table ingestion (#16648) * Workaround to ingesting from Delta table in 3.2.0. With the upgrade to Kernel 3.2.0, the Druid Delta connector extension isn't able to ingest from Delta tables successfully. Please see delta-io/delta#3299 The underlying problem seems to be coming from https://github.com/delta-io/delta/blob/master/kernel/kernel-defaults/src/main/java/io/delta/kernel/defaults/internal/logstore/LogStoreProvider.java#L99 This patch is a workaround to setting the thread class loader explictly. The Kernel community may consider a fix in the next release as it's affected another connector as well. * Address review comment: clear the CL after the Thread CL is set.
vkorukanti
pushed a commit
to vkorukanti/delta
that referenced
this issue
Aug 30, 2024
…`. (delta-io#3304) Look for the `LogStore` class more broadly in the class loader than just the thread local's class loader. The thread context class loader requires the Thread local variables to have the `LogStore` in it, but this class loader may not have all the dependencies wired up. Not tested yet. Fixes delta-io#3299.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug
Which Delta project/connector is this regarding?
Describe the problem
Steps to reproduce
Easy to reproduce using a simple ingest query to ingest a Delta table from the Druid-Delta connector. After upgrading the Delta Kernel dependency from
3.1.0
to3.2.0
, we noticed that ingestion from existing Delta tables setup locally stopped working. The stacktrace is:The underlying issue seems to be that it's unable to instantiate
LogStore
, which is coming from a new code path added in https://github.com/delta-io/delta/pull/2770/files.After adding the dependency to the Druid-Delta connector, I was still seeing the same error:
Thanks to @vkorukanti who swiftly helped provide a workaround by adding the following line before making calls to the Kernel APIs:
Thread.currentThread().setContextClassLoader(LogStore.class.getClassLoader());
before calls to the Kernel APIIt's unclear if this workaround is needed for all the Kernel APIs or just specifically when getting the snapshot information - i.e.,
table.getLatestSnapshot(engine)
Observed results
Ingestion fails.
Further details
The slack thread has some more information: https://delta-users.slack.com/archives/CJ70UCSHM/p1719190251166299
Environment information
Willingness to contribute
The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?
The text was updated successfully, but these errors were encountered: