Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-6813][Sort] MetricStateUtils threw NPE when write to es and no dirtyRecordsOut counter #6814

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

wangpeix
Copy link
Contributor

Prepare a Pull Request

Motivation

Fix metricStateUtils threw NPE when write to es and no dirtyRecordsOut counter.

Modifications

Register a DIRTY counter.

@gong
Copy link
Contributor

gong commented Dec 11, 2022

@wangpeix https://github.com/apache/inlong/blob/master/inlong-sort/sort-connectors/elasticsearch-base/src/main/java/org/apache/inlong/sort/elasticsearch/table/RowElasticsearchSinkFunction.java and
https://github.com/apache/inlong/blob/master/inlong-sort/sort-connectors/elasticsearch-base/src/main/java/org/apache/inlong/sort/elasticsearch/ElasticsearchSinkBase.java
will register duplication dirty metric, It will lead metric duplication error when set metric reporter.
So I suggest modify MetricStateUtils to add judge null. @EMsnap will update elasticsearch metric computing.

@healchow healchow self-requested a review December 11, 2022 15:25
@wangpeix
Copy link
Contributor Author

@gong thanks, I will optimize it.

@wangpeix
Copy link
Contributor Author

@gong The code has been optimized, please help me review it again, thanks.

@dockerzhang dockerzhang merged commit 9da24eb into apache:master Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][Sort] MetricStateUtils threw NPE when write to es and no dirtyRecordsOut counter
4 participants