You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stefan Richter (JIRA)" <ji...@apache.org> on 2016/06/16 13:20:05 UTC
[jira] [Updated] (FLINK-4083) Use ClosureCleaner for Join where and
equalTo
[ https://issues.apache.org/jira/browse/FLINK-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Richter updated FLINK-4083:
----------------------------------
Description:
When specifying a key selector in the where or equalTo clause of a Join, the closure cleaner is not used. Same problem as FLINK-4078.
{code}
.join(ds)
.where(new KeySelector<CustomType, Integer>() {
@Override
public Integer getKey(CustomType value) {
return value.myInt;
}
})
.equalTo(new KeySelector<CustomType, Integer>(){
@Override
public Integer getKey(CustomType value) throws Exception {
return value.myInt;
}
});
{code}
The problem is that the KeySelector is an anonymous inner class and as such as a reference to the outer object. Normally, this would be rectified by the closure cleaner but the cleaner is not used in Join.where() and Join.equalTo().
was:
When specifying a key selector in the where or equalTo clause of a Join, the closure cleaner is not used. Same problem as FLINK-4078.
{code}
.join(ds)
.where(new KeySelector<CustomType, Integer>() {
@Override
public Integer getKey(CustomType value) {
return value.myInt;
}
})
.equalTo(new KeySelector<CustomType, Integer>(){
@Override
public Integer getKey(CustomType value) throws Exception {
return value.myInt;
}
});
{code}
The problem is that the KeySelector is an anonymous inner class and as such as a reference to the outer object. Normally, this would be rectified by the closure cleaner but the cleaner is not used in CoGroup.where().
> Use ClosureCleaner for Join where and equalTo
> ---------------------------------------------
>
> Key: FLINK-4083
> URL: https://issues.apache.org/jira/browse/FLINK-4083
> Project: Flink
> Issue Type: Bug
> Affects Versions: 1.0.3
> Reporter: Stefan Richter
> Assignee: Stefan Richter
> Priority: Minor
>
> When specifying a key selector in the where or equalTo clause of a Join, the closure cleaner is not used. Same problem as FLINK-4078.
> {code}
> .join(ds)
> .where(new KeySelector<CustomType, Integer>() {
> @Override
> public Integer getKey(CustomType value) {
> return value.myInt;
> }
> })
> .equalTo(new KeySelector<CustomType, Integer>(){
> @Override
> public Integer getKey(CustomType value) throws Exception {
> return value.myInt;
> }
> });
> {code}
> The problem is that the KeySelector is an anonymous inner class and as such as a reference to the outer object. Normally, this would be rectified by the closure cleaner but the cleaner is not used in Join.where() and Join.equalTo().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)