[client] Add Admin API to describe buckets - #4029
Open
fhan688 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: #3436
Fluss currently does not provide a public Admin API for retrieving bucket-level metadata, including replica placement and leader/ISR state. This information is required by administrative tools and by the planned Flink
sys.describe_bucketsprocedure.This is the first of two PRs planned for #3436. It introduces the core Admin API, RPC contract, and server-side implementation. A follow-up PR will add the Flink procedure and close the issue.
Brief change log
BucketInforesult type, exposing the table path and ID, optional partition ID and name, bucket ID, optional leader and leader epoch, replicas, and ISR.Admin#describeBuckets(TablePath)andAdmin#describeBuckets(TablePath, PartitionSpec).DESCRIBE_BUCKETSRPC (API key 1065), including request/response messages, gateway wiring, and client-side conversion.DESCRIBEpermission and preserve table/partition validation exceptions at the Admin API boundary.The Flink
sys.describe_bucketsprocedure is intentionally excluded from this PR and will be added in the follow-up PR.Tests
BucketInfoTestClientRpcMessageUtilsTestApiKeysTestApiManagerTestZooKeeperClientTest#testPartitionDescribeBucketsITCaseFlussAuthorizationITCase#testDescribeTableOperationfluss-flink-commontest compilation forAdmininterface compatibilitygit diff --checkAPI and Format
@PublicEvolvingBucketInfoclass and two new methods toAdmin.DESCRIBE_BUCKETSAPI (key 1065) and its protobuf messages.PbBucketMetadatawire message is unchanged, avoiding overlap with the separate ISR metadata work in feat: shell tool #3360.Documentation
Public API Javadocs are included for
BucketInfoand the newAdminmethods.No user-facing Flink procedure documentation is added in this PR because the procedure is outside this PR's scope. The follow-up PR will add the procedure, integration tests, and corresponding documentation.