[ https://issues.apache.org/jira/browse/FLINK-4883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15621980#comment-15621980 ]
ASF GitHub Bot commented on FLINK-4883: --------------------------------------- GitHub user Renkai opened a pull request: https://github.com/apache/flink/pull/2729 [FLINK-4883]Prevent UDFs implementations through Scala singleton objects The code changes should be work, but I was quite a lot confused for these reasons 1. The Scala wrapper for DataStream and DataSet do almost the same thing, but they have a lot of differences in code style,name rule and code structures. 2. Some of the DataSet operators are surrounded by clean function, while some else are not, I think they might they might be forgotten to add. 3. Scala and Java have different version of ClosureCleaner,I think one ClosureCleaner should be enough, or the Java version of ClosureCleaner be a basic version, Scala version can call the Java version directly and add some additional logics. I think the Scala wrapper of DataSet could be rewrite to make it harmonic with the wrapper of DataStream, maybe we can create another issue ticket to do it. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Renkai/flink FLINK-4883 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2729.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2729 ---- commit 508a026bb5bf56befb778ce625f6872f70753a87 Author: renkai <gaelook...@gmail.com> Date: 2016-10-30T14:28:41Z Prevent UDFs implementations through Scala singleton objects commit 6d57537a4c462f0d21a0aaff143f7fe5ef16b064 Author: renkai <gaelook...@gmail.com> Date: 2016-10-30T14:41:30Z Prevent UDFs implementations through Scala singleton objects commit 0ddc5388889fb8608ad840a6914b8c73300994e4 Author: renkai <gaelook...@gmail.com> Date: 2016-10-30T15:02:33Z revert method name since [ERROR] Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.7.0:cmp (default) on project flink-java: Breaking the build because there is at least one binary incompatible class: org.apache.flink.api.java.DataSet commit 9895d6ef27754a1d3b667b17cce5aeb6d30081d1 Author: renkai <gaelook...@gmail.com> Date: 2016-10-30T15:33:00Z make function serializable commit bb40ac78d9833d0607dc4e8ded922b7e567cb68b Author: renkai <gaelook...@gmail.com> Date: 2016-10-30T15:57:53Z solve error file=/home/travis/build/Renkai/flink/flink-scala/src/test/scala/org/apache/flink/api/scala/extensions/ScalaObjectCheckerTest.scala message=Header does not match expected text line=10 commit c75bcb60a2edabd1fd6cfd2270218687c3c747da Author: renkai <gaelook...@gmail.com> Date: 2016-10-31T00:35:27Z solve error file=/home/travis/build/Renkai/flink/flink-streaming-scala/src/test/scala/org/apache/flink/streaming/api/scala/ScalaObjectCheckStreamTest.scala message=Header does not match expected text line=10 ---- > 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)