Skip to content

Commit

Permalink
Add comment for pakcage overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
liurenjie1024 committed Jan 28, 2024
1 parent 97036f2 commit d98e7e7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Why we need this package?

In this package we have overrided the `iceberg-common` package, since in original `iceberg-common` it uses `Thread.getContextClassLoader` to load classes dynamically.
While this works well in most cases, it will fail when invoked by jni, since by default jni threads was passed bootstrap class loader, and `Thread.getContextClassLoader`
will inherit parent thread's class loader. That's to say, all threads created by jni will use bootstrap class loader. While we can use `Thread.setContextClassLoader` to it system class loader
manually, but it's not possible in all cases since iceberg used thread pools internally, which can't be hooked by us.

0 comments on commit d98e7e7

Please sign in to comment.