Skip to content

[client] Expose node resources and table sizes - #4228

Open
fkzhao wants to merge 2 commits into
apache:mainfrom
fkzhao:main
Open

[client] Expose node resources and table sizes#4228
fkzhao wants to merge 2 commits into
apache:mainfrom
fkzhao:main

Conversation

@fkzhao

@fkzhao fkzhao commented Sep 3, 2026

Copy link
Copy Markdown

Purpose

Add node resource information and table data size statistics to the Fluss Java Client.

Linked issue: close #xxx

Brief change log

  • Add CPU, memory, and data disk information to ServerNode.
  • Add NodeResourceInfo for exposing node resource snapshots.
  • Make Admin#getServerNodes() return Coordinator and TabletServer nodes with resource information.
  • Add Prometheus metrics for node CPU, memory, and data disk usage.
  • Rename internal resource information RPC to GetServerInfoRequest/Response.
  • Remove the obsolete ServerMetrics client API.
  • Add table data size to TableStats.
  • Add TableInfoWithStats and Admin#listTableDetails(String).
  • Update Java Client documentation and examples.

Tests

  • FlussAdminITCase#testGetServerNodes
  • FlussAdminITCase#testGetTableStatsForLogTable
  • FlussAdminITCase#testGetTableStatsForPrimaryKeyTableWithFailover
  • FlussAdminITCase#testListTableDetailsIncludesTableStats
  • ServerNodeTest
  • TabletServerResourceProbeTest
  • mvn -pl fluss-client -am -DskipTests test-compile
  • mvn -pl fluss-flink/fluss-flink-common -am -DskipTests test-compile
  • mvn spotless:check -pl fluss-rpc,fluss-client,fluss-server

API and Format

  • Admin#getServerNodes() returns all currently available Coordinator and TabletServer nodes.
  • ServerNode#resourceInfo() exposes:
    • CPU core count
    • Total memory
    • Current CPU usage
    • Used memory
    • Total and used data disk space
    • Collection timestamp
  • TableStats#getDataSizeBytes() exposes the local physical data size of a table.
  • Admin#listTableDetails(String) returns table metadata together with current table statistics.
  • Node resource information is queried directly from Fluss nodes and is independent of Prometheus querying.
  • The RPC API key remains unchanged.

Documentation

  • Update the Java Client documentation with examples for:
    • Querying node resource information
    • Querying table data size
    • Listing table metadata together with statistics
  • Add the ServerInfoClientExample example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant