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-8067) User code ClassLoader not set before calling ProcessingTimeCallback
Date Mon, 11 Jun 2018 13:35:00 GMT

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

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

Github user pnowojski commented on the issue:

    https://github.com/apache/flink/pull/6081
  
    @yanghua why is it difficult? Can not you create more or less similar test to @GJL's `testSetsUserCodeClassLoader`
from here: https://github.com/apache/flink/pull/4980/files. With couple side notes:
    
    1. build `MockEnvironment` using `MockEnvironmentBuilder` with a custom user class loader
- do not use mockito for that
    2. create a stream task (reusing one of the implementation in `StreamTaskTest.java` or
create a new one)
    3. register a timer service, wait for it's triggering and assert the user class loader
in `ProcessingTimeCallback#onProcessingTime`


> User code ClassLoader not set before calling ProcessingTimeCallback
> -------------------------------------------------------------------
>
>                 Key: FLINK-8067
>                 URL: https://issues.apache.org/jira/browse/FLINK-8067
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.4.0
>            Reporter: Gary Yao
>            Assignee: vinoyang
>            Priority: Minor
>             Fix For: 1.6.0, 1.5.1
>
>
> The user code ClassLoader is not set as the context ClassLoader for the thread invoking
{{ProcessingTimeCallback#onProcessingTime(long timestamp)}}:
> https://github.com/apache/flink/blob/84a07a34ac22af14f2dd0319447ca5f45de6d0bb/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L222
> This is problematic, for example, if user code dynamically loads classes in {{ProcessFunction#onTimer(long
timestamp, OnTimerContext ctx, Collector<O> out)}} using the current thread's context
ClassLoader (also see FLINK-8005).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message