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

[hotfix] Report empty string as value for partition label for non-partitioned table #316

Conversation

michaelkoepf
Copy link
Contributor

@michaelkoepf michaelkoepf commented Jan 8, 2025

Purpose

Linked issue: close #302

Tests

See changes in

  • com.alibaba.fluss.metrics.prometheus.PrometheusReporterDifferentLabelValueTest
  • com.alibaba.fluss.metrics.jmx.JMXReporterTest

Additional manually verification by creating the following 2 tables

CREATE TABLE tbl1(
  a STRING,
  b INT,
  PRIMARY KEY(a, b) NOT ENFORCED 
) PARTITIONED BY (a) WITH (
  'table.auto-partition.enabled' = 'true',
   'table.auto-partition.time-unit' = 'YEAR',
   'table.auto_partitioning.time-zone' = 'Asia/Shanghai'
);

CREATE TABLE tbl2(
  c STRING,
  d INT,
  PRIMARY KEY(c,d) NOT ENFORCED 
);

in the Flink SQL client and check if all metrics are reported in Prometheus and JMX.

Prometheus

Screenshot from 2025-01-08 21-09-45

JMX (non-partitioned tables have a single entry with an empty string as key)

Screenshot from 2025-01-08 21-18-42

API and Format

n/a

Documentation

n/a

Report empty string as value for partition label for non-partitioned table

Issue alibaba#302
Added test cases for Prometheus metric exporter

Issue alibaba#302
@michaelkoepf michaelkoepf changed the title [WIP][hotfix] Metric labels for non partitioned tables [hotfix] Metric labels for non partitioned tables Jan 8, 2025
@michaelkoepf michaelkoepf marked this pull request as ready for review January 8, 2025 20:27
- Fix spotless errors
- Change debug message
@michaelkoepf michaelkoepf force-pushed the hotfix/metric-labels-for-non-partitioned-tables branch from 2d1f5b1 to bb9806f Compare January 8, 2025 20:37
@michaelkoepf michaelkoepf changed the title [hotfix] Metric labels for non partitioned tables [hotfix] Metric labels for non-partitioned tables Jan 8, 2025
Copy link
Collaborator

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelkoepf Thanks for the pr. Just one comment. Otherwise, LGTM!

Copy link
Collaborator

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelkoepf Thanks.. LGTM! Will merge later

@luoyuxia luoyuxia changed the title [hotfix] Metric labels for non-partitioned tables [hotfix] report empty string as value for partition label for non-partitioned table Jan 9, 2025
@luoyuxia luoyuxia changed the title [hotfix] report empty string as value for partition label for non-partitioned table [hotfix] Report empty string as value for partition label for non-partitioned table Jan 9, 2025
@luoyuxia luoyuxia merged commit 28b3c3c into alibaba:main Jan 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants