Conversation
This was referenced Sep 28, 2026
REST requests carried httpclient's default User-Agent, and Hadoop PVFS replaced it with a bare HadoopPVFS. REST catalog requests now carry Paimon's unified User-Agent format, module(transport;features) extended, with Apache-HttpClient/<version> as the transport. The new catalog options user-agent.module, user-agent.features and user-agent.extended fill the other parts; object storage requests read the same keys, so one setting covers both. The module defaults to Paimon/<version>. A user-set header.User-Agent still replaces the whole value, and PVFS adds HadoopPVFS as the first feature. Both versions are written into BuildVersions at build time by the templating-maven-plugin, so reading them needs no class loader lookup.
sundapeng
force-pushed
the
rest-user-agent
branch
from
September 29, 2026 01:08
b680993 to
460a235
Compare
Akash3121
approved these changes
Sep 29, 2026
Akash3121
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Reviewed the unified REST User-Agent implementation end to end. The generated version metadata, default and configured formatting, explicit header.User-Agent precedence, server-config merge behavior, and Hadoop PVFS feature propagation all look consistent. The focused formatter, REST request, and PVFS tests pass. No blocking issues found from my side.
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
REST catalog requests from Java carry httpclient's default User-Agent,
Apache-HttpClient/5.5.1 (Java/<version>), so Paimon clients can't be told apart from other Java clients in the catalog server's request logs. An engine that wants to identify itself has to replace the whole value throughheader.User-Agent, which drops the Paimon version, and Hadoop PVFS does the same with a bareHadoopPVFS.REST requests now carry Paimon's unified User-Agent format,
<module>(<transport>[;<feature>...])[ <extended>], the one object storage requests adopt as well (#10306):user-agent.module,user-agent.featuresanduser-agent.extended, shared with object storage requests, so an engine configures its identity once for both.Paimon/<version>, transportApache-HttpClient/<version>. Both versions are written in at build time by thetemplating-maven-plugin, so no class loader lookup is involved.header.User-Agentstill replaces the whole value, so existing setups are unaffected.HadoopPVFSfirst in the features instead of replacing the User-Agent.Examples:
Paimon/2.2-SNAPSHOT(Apache-HttpClient/5.5.1)user-agent.features=Flink,user-agent.extended=vvrPaimon/2.2-SNAPSHOT(Apache-HttpClient/5.5.1;Flink) vvrheader.User-Agent=starrocks/userstarrocks/useruser-agent.features=FlinkPaimon/2.2-SNAPSHOT(Apache-HttpClient/5.5.1;HadoopPVFS;Flink)Related: #10306 (Java OSS), #10321 (Jindo FileIO), #10309 (Python REST), apache/paimon-rust#992 (Rust REST). This PR, #10306 and #10321 only share the
templating-maven-pluginentry in the rootpom.xml.Tests
HttpClientUtilsTest,MockRESTCatalogTestandMockRestVirtualFileSystemTestcover the default, the new options, theheader.User-Agentoverride and PVFS;ConfigOptionsDocsCompletenessITCasepassed. Also checked on a live DLF REST catalog: its request log shows the configured features and extended part.Documentation
catalog_configuration.htmldocuments the three new options.