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

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

Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/2729
  
    @Renkai I would be ok with the change if we call the method 
`forceAllowScalaObjectFunction()`, along with a big warning that users should 
not use it.
    
    By the way, what's the reason for adding the `check()` method, can't this 
simply be done in `clean()`? (sorry if this was already discussed elsewhere and 
I'm making a fool of myself right now).
    
    It's good, though, that you noticed that a call to `clean()` is missing in 
places. We should definitely add those.


> Prevent UDFs implementations through Scala singleton objects
> ------------------------------------------------------------
>
>                 Key: FLINK-4883
>                 URL: https://issues.apache.org/jira/browse/FLINK-4883
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Stefan Richter
>            Assignee: Renkai Ge
>
> Currently, user can create and use UDFs in Scala like this:
> {code}
> object FlatMapper extends RichCoFlatMapFunction[Long, String, (Long, String)] 
> {
> ...
> }
> {code}
> However, this leads to problems as the UDF is now a singleton that Flink 
> could use across several operator instances, which leads to job failures. We 
> should detect and prevent the usage of singleton UDFs.



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

Reply via email to