You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/23 01:47:13 UTC

[GitHub] [iceberg] asnowfox edited a comment on pull request #3032: #2468 fix the catalog interface cast exception.

asnowfox edited a comment on pull request #3032:
URL: https://github.com/apache/iceberg/pull/3032#issuecomment-925431090


   > @asnowfox , How did you ensure that the class was loaded by other different class loader ? Is this PR resolved your issue ?
   
   yes, I do. and I run it in my 8 nodes flink cluster.
   
   public static class Builder {
       private final Class<?> baseClass;
       **// This loader is the main class thread's class loader.**
       private ClassLoader loader = Thread.currentThread().getContextClassLoader();
       private Ctor ctor = null;
       private Map<String, Throwable> problems = new HashMap<String, Throwable>();
   
       public Builder(Class<?> baseClass) {
         this.baseClass = baseClass;
         **//Here I think if we use the Thread.currentThread().getContextClassLoader() It will be
         //the main Therad's loader. If other thread call this method. I think it should use this
         //thread's class loader.** 
         this.loader = this.baseClass.getClassLoader();
       }
   
       public Builder() {
         this.baseClass = null;
       }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org