Re: Custom Counter on Flink File Source

2023-06-07 Thread Hang Ruan
Group metricGroup() { > > *return* *null*; > > } > > > > Am I doing any mistake? > > > > Regards, > > Kirti Dhar > > > > *From:* Hang Ruan > *Sent:* 06 June 2023 08:12 > *To:* Kirti Dhar Upadhyay K > *Cc:* user@flink.apache.o

RE: Custom Counter on Flink File Source

2023-06-07 Thread Kirti Dhar Upadhyay K via user
Thanks Hang. Any expected date for Flink 1.18.0 release? Regards, Kirti Dhar From: Hang Ruan Sent: 07 June 2023 07:34 To: Kirti Dhar Upadhyay K Cc: user@flink.apache.org Subject: Re: Custom Counter on Flink File Source Hi, Kirti Dhar Upadhyay K. I check the FLIP-274[1]. This issue will be

Re: Custom Counter on Flink File Source

2023-06-06 Thread Hang Ruan
t; *From:* Hang Ruan > *Sent:* 06 June 2023 08:12 > *To:* Kirti Dhar Upadhyay K > *Cc:* user@flink.apache.org > *Subject:* Re: Custom Counter on Flink File Source > > > > Hi, Kirti Dhar Upadhyay K. > > > > We could get the metric group from the context, like `

RE: Custom Counter on Flink File Source

2023-06-06 Thread Kirti Dhar Upadhyay K via user
SplitEnumeratorMetricGroup metricGroup() { return null; } Am I doing any mistake? Regards, Kirti Dhar From: Hang Ruan Sent: 06 June 2023 08:12 To: Kirti Dhar Upadhyay K Cc: user@flink.apache.org Subject: Re: Custom Counter on Flink File Source Hi, Kirti Dhar Upadhyay K. We could get the

Re: Custom Counter on Flink File Source

2023-06-05 Thread Hang Ruan
Hi, Kirti Dhar Upadhyay K. We could get the metric group from the context, like `SourceReaderContext` and `SplitEnumeratorContext`. These contexts could be found when creating readers and enumerators. See `AbstractFileSource#createReader` and `AbstractFileSource#createEnumerator`. Best, Hang Kir

Custom Counter on Flink File Source

2023-06-05 Thread Kirti Dhar Upadhyay K via user
Hi Community, I am trying to add a new counter for number of files collected on Flink File Source. Referring the doc https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/ I understand how to add a new counter on any operator. this.counter = getRuntimeContext().getMetricGroup(