flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2509) Improve error messages when user code classes are not found
Date Wed, 12 Aug 2015 04:06:46 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14692879#comment-14692879
] 

ASF GitHub Bot commented on FLINK-2509:
---------------------------------------

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


> Improve error messages when user code classes are not found
> -----------------------------------------------------------
>
>                 Key: FLINK-2509
>                 URL: https://issues.apache.org/jira/browse/FLINK-2509
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.10
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>             Fix For: 0.10
>
>
> When a job fails because the user code classes are not found, we should add some information
about the class loader and class path into the exception message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message