Github user hsaputra commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1008#discussion_r36825210
  
    --- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java
 ---
    @@ -198,12 +199,26 @@ public void setStreamOperator(StreamOperator<?> 
operator) {
                        }
                }
        }
    -
    -   @SuppressWarnings({ "unchecked" })
    +   
        public <T> T getStreamOperator(ClassLoader cl) {
                try {
    -                   return (T) 
InstantiationUtil.readObjectFromConfig(this.config, SERIALIZEDUDF, cl);
    -           } catch (Exception e) {
    +                   @SuppressWarnings("unchecked")
    +                   T result = (T) 
InstantiationUtil.readObjectFromConfig(this.config, SERIALIZEDUDF, cl);
    +                   return result;
    +           }
    +           catch (ClassNotFoundException e) {
    +                   String classLoaderInfo = 
ClassLoaderUtil.getUserCodeClassLoaderInfo(cl);
    +                   boolean loadableDoubleCheck = 
ClassLoaderUtil.validateClassLoadable(e, cl);
    +                   
    +                   String exceptionMessage = "Cannot load user class: " + 
e.getMessage()
    +                                   + "\nClassLoader info: " + 
classLoaderInfo + 
    +                                   (loadableDoubleCheck ? 
    +                                                   "Class was actually 
found in classloader - deserialization issue." :
    +                                                   "Class not resolveable 
through given classloader.");
    --- End diff --
    
    small nit on message: Class was not resolvable


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to