Re: NPE when aggregate window.

2021-06-15 Thread Si-li Liu
The key used in the keyBy function. HaochengWang 于2021年6月12日周六 下午11:29写道: > Hi, > I meet the same exception, and find your suggestion here. I'm confused > about > the word 'grouping key', is that refers to the key of the accumulating hash > map, or the key that separate the stream by some inform

Re: NPE when aggregate window.

2021-06-12 Thread HaochengWang
Hi, I meet the same exception, and find your suggestion here. I'm confused about the word 'grouping key', is that refers to the key of the accumulating hash map, or the key that separate the stream by some information? -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabbl

Re: NPE when aggregate window.

2021-05-05 Thread Arvid Heise
Hi, I'm assuming it's just a workaround for changing fields. The string representation happens to be stable while the underlying values change. It's best practice to use completely immutable types if you have similar issues, you should double-check that nothing can be changed in your data type or

Re: NPE when aggregate window.

2021-05-05 Thread tuk
Can some provide a bit more explanation why replacing /com.google.common.base.Objects.hashCode with toString().hashCode(),/ with /toString().hashCode()/ making it work? -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: NPE when aggregate window.

2021-04-13 Thread Si-li Liu
Thanks for your help. After I replaced com.google.common.base.Objects.hashCode with toString().hashCode(), the NPE problem is solved. Arvid Heise 于2021年4月13日周二 下午11:40写道: > To second Dawids question: are all fields final or is it possible that > their values are changing? > > On Tue, Apr 13, 20

Re: NPE when aggregate window.

2021-04-13 Thread Arvid Heise
To second Dawids question: are all fields final or is it possible that their values are changing? On Tue, Apr 13, 2021 at 4:41 PM Si-li Liu wrote: > Hi,Dawid, > > Thanks for your help. I use com.google.common.base.Objects.hashCode, pass > all fields to it and generate a hashcode, and the equal m

Re: NPE when aggregate window.

2021-04-13 Thread Si-li Liu
Hi,Dawid, Thanks for your help. I use com.google.common.base.Objects.hashCode, pass all fields to it and generate a hashcode, and the equal method also compare all the fields. Dawid Wysakowicz 于2021年4月13日周二 下午8:10写道: > Hi, > > Could you check that your grouping key has a stable hashcode and equ

Re: NPE when aggregate window.

2021-04-13 Thread Dawid Wysakowicz
Hi, Could you check that your grouping key has a stable hashcode and equals? It is very likely caused by an unstable hashcode and that a record with an incorrect key ends up on a wrong task manager. Best, Dawid On 13/04/2021 08:47, Si-li Liu wrote: > Hi,  > > I encounter a weird NPE when try to

NPE when aggregate window.

2021-04-12 Thread Si-li Liu
Hi, I encounter a weird NPE when try to do aggregate on a fixed window. If I set a small parallism number the whole job uses only one TaskManager, this NPE will not happen. But when the job scales to two TaskManagers, the TaskManager will crash at Create stage. The Flink version I use is 1.11.1.