You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Alexei Nekrassov (JIRA)" <ji...@apache.org> on 2018/07/09 14:07:00 UTC

[jira] [Created] (FLINK-9784) Inconsistent use of 'static' in AsyncIOExample.java

Alexei Nekrassov created FLINK-9784:
---------------------------------------

             Summary: Inconsistent use of 'static' in AsyncIOExample.java
                 Key: FLINK-9784
                 URL: https://issues.apache.org/jira/browse/FLINK-9784
             Project: Flink
          Issue Type: Bug
          Components: Examples
    Affects Versions: 1.4.2, 1.5.0
            Reporter: Alexei Nekrassov


In SampleAsyncFunction having _executorService_ and _random_ as static, but _counter_ as instance-specific will not work when someone creates a second instance of SampleAsyncFunction. In second SampleAsyncFunction the _counter_ will be 0 and we will re-intialize static _executorService_ and _random_, thus interfering with the first SampleAsyncFunction object.

To fix this example and make it clearer, make _executorService_ and _random_ instance-specific. That will make _counter_ redundant; also synchronization on class will no longer be needed.



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

Re: [jira] [Created] (FLINK-9784) Inconsistent use of 'static' in AsyncIOExample.java

Posted by Till Rohrmann <tr...@apache.org>.
I've assigned you.

On Mon, Jul 9, 2018 at 5:53 PM NEKRASSOV, ALEXEI <an...@att.com> wrote:

> In JIRA I don't see an option to assign this issue to myself. Can someone
> please assign?
>
> Thanks,
> Alex
>
> -----Original Message-----
> From: Alexei Nekrassov (JIRA) [mailto:jira@apache.org]
> Sent: Monday, July 09, 2018 10:07 AM
> To: dev@flink.apache.org
> Subject: [jira] [Created] (FLINK-9784) Inconsistent use of 'static' in
> AsyncIOExample.java
>
> Alexei Nekrassov created FLINK-9784:
> ---------------------------------------
>
>              Summary: Inconsistent use of 'static' in AsyncIOExample.java
>                  Key: FLINK-9784
>                  URL:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_FLINK-2D9784&d=DwICaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=aQRKg6d5fsz42zXkyiSdqg&m=Pbmeb7Zyk2Wn-mZsyPmOXap0vmNDg6VmS0WFzbSACsw&s=FP7Qbc18SSgRqKF72mtLVzT4jUVeEsBMc2BVAnhTCAA&e=
>              Project: Flink
>           Issue Type: Bug
>           Components: Examples
>     Affects Versions: 1.4.2, 1.5.0
>             Reporter: Alexei Nekrassov
>
>
> In SampleAsyncFunction having _executorService_ and _random_ as static,
> but _counter_ as instance-specific will not work when someone creates a
> second instance of SampleAsyncFunction. In second SampleAsyncFunction the
> _counter_ will be 0 and we will re-intialize static _executorService_ and
> _random_, thus interfering with the first SampleAsyncFunction object.
>
> To fix this example and make it clearer, make _executorService_ and
> _random_ instance-specific. That will make _counter_ redundant; also
> synchronization on class will no longer be needed.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)
>

RE: [jira] [Created] (FLINK-9784) Inconsistent use of 'static' in AsyncIOExample.java

Posted by "NEKRASSOV, ALEXEI" <an...@att.com>.
In JIRA I don't see an option to assign this issue to myself. Can someone please assign?

Thanks,
Alex 

-----Original Message-----
From: Alexei Nekrassov (JIRA) [mailto:jira@apache.org] 
Sent: Monday, July 09, 2018 10:07 AM
To: dev@flink.apache.org
Subject: [jira] [Created] (FLINK-9784) Inconsistent use of 'static' in AsyncIOExample.java

Alexei Nekrassov created FLINK-9784:
---------------------------------------

             Summary: Inconsistent use of 'static' in AsyncIOExample.java
                 Key: FLINK-9784
                 URL: https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_FLINK-2D9784&d=DwICaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=aQRKg6d5fsz42zXkyiSdqg&m=Pbmeb7Zyk2Wn-mZsyPmOXap0vmNDg6VmS0WFzbSACsw&s=FP7Qbc18SSgRqKF72mtLVzT4jUVeEsBMc2BVAnhTCAA&e=
             Project: Flink
          Issue Type: Bug
          Components: Examples
    Affects Versions: 1.4.2, 1.5.0
            Reporter: Alexei Nekrassov


In SampleAsyncFunction having _executorService_ and _random_ as static, but _counter_ as instance-specific will not work when someone creates a second instance of SampleAsyncFunction. In second SampleAsyncFunction the _counter_ will be 0 and we will re-intialize static _executorService_ and _random_, thus interfering with the first SampleAsyncFunction object.

To fix this example and make it clearer, make _executorService_ and _random_ instance-specific. That will make _counter_ redundant; also synchronization on class will no longer be needed.



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