prajwal-jadhav01 commented on code in PR #20121:
URL: https://github.com/apache/pinot/pull/20121#discussion_r4577357626
##########
pinot-connectors/pinot-flink-connector/src/main/java/org/apache/pinot/connector/flink/sink/PinotSink.java:
##########
@@ -83,6 +87,18 @@ public PinotSink(PinotGenericRowConverter<T>
recordConverter, TableConfig tableC
DEFAULT_SEGMENT_FLUSH_MAX_NUM_RECORDS, DEFAULT_EXECUTOR_POOL_SIZE);
}
+ /// Same as [#PinotSink(PinotGenericRowConverter, TableConfig, Schema,
String)], and also adds `authToken` to the
+ /// batch config so segment uploads authenticate with the controller. A
non-blank `authToken` overrides any token
+ /// already in the batch config.
+ ///
+ /// The given `tableConfig` is not modified: the sink works on a deep copy,
so the token never ends up in the
+ /// caller's table config.
+ public PinotSink(PinotGenericRowConverter<T> recordConverter, TableConfig
tableConfig, Schema schema,
+ String controllerBaseUrl, @Nullable String authToken) {
+ this(recordConverter,
prepareTableConfigForSink(copyTableConfig(tableConfig), controllerBaseUrl,
authToken),
Review Comment:
Done. `PinotSink` now keeps the token in a nullable `_authToken` field and
the writer builds the provider from it, so the token never goes into any table
config. The auth-specific `prepareTableConfigForSink` overload is gone. A
non-blank explicit token takes precedence; for null or blank it falls back to
the batch-config `authToken`. I also added the token to the full constructor so
it combines with custom flush, executor and segment naming settings, and kept
the deep copy so the caller's config is unchanged.
--
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]