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

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

Github user EronWright commented on the issue:

    https://github.com/apache/flink/pull/3933
  
    @tillrohrmann the issue is with code that uses the thread's context 
classloader (TCCL), that may execute in `Factory.create` or later in the hook 
methods.  For example, the Pravega connector uses grpc, which uses the TCCL 
during initialization (see 
[ManagedChannelProvider](https://github.com/grpc/grpc-java/blob/v1.3.0/core/src/main/java/io/grpc/ManagedChannelProvider.java#L132)).
    
    Looking at other areas in Flink where usercode is called, I see that the 
TCCL is consistently set.  For example, see 
[InputFormatVertex](https://github.com/apache/flink/blob/2c68085f658873c2d5836fbad6b82be76a79f0f9/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/InputFormatVertex.java#L81),
 
[ExecutionJobVertex](https://github.com/apache/flink/blob/7ad489d87281b74c53d3b1a0dd97e56b7a8ef303/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java#L229),
 and 
[Task](https://github.com/apache/flink/blob/6181302f1ab741b86af357e4513f5952a5fc1531/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L698).



> Create checkpoint hook with user classloader
> --------------------------------------------
>
>                 Key: FLINK-6606
>                 URL: https://issues.apache.org/jira/browse/FLINK-6606
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>            Reporter: Eron Wright 
>            Assignee: Eron Wright 
>            Priority: Blocker
>             Fix For: 1.3.0
>
>
> Flink should set the thread's classloader when calling the checkpoint hook 
> factory's `create` method.   Without that, the hook is likely to fail during 
> initialization (e.g. using ServiceLoader). 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to