Jackie-Jiang commented on code in PR #16884:
URL: https://github.com/apache/pinot/pull/16884#discussion_r2393113493
##########
pinot-plugins/pinot-file-system/pinot-gcs/src/main/java/org/apache/pinot/plugin/filesystem/GcsPinotFS.java:
##########
@@ -70,9 +72,15 @@ public class GcsPinotFS extends BasePinotFS {
@Override
public void init(PinotConfiguration config) {
+ String version = GcsPinotFS.class.getPackage().getImplementationVersion();
+ if (version == null) {
+ version = "unknown";
+ }
+ String userAgent = "apache-pinot/" + version + " (GPN:apache-pinot)";
Credentials credentials = null;
try {
- StorageOptions.Builder storageBuilder = StorageOptions.newBuilder();
+ StorageOptions.Builder storageBuilder = StorageOptions.newBuilder()
+
.setHeaderProvider(FixedHeaderProvider.create(ImmutableMap.of("User-agent",
userAgent)));
Review Comment:
(minor) Suggest using `Map.of()`
```suggestion
.setHeaderProvider(FixedHeaderProvider.create(Map.of("User-agent",
userAgent)));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]