Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Keller committed Jan 21, 2024
1 parent 11daa38 commit c6808e1
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@ public JsonConverter jsonConverter() {
return jsonConverter;
}

/**
* This method attempts to load the Kafka Connect worker properties, which are not exposed to
* connectors. It does this by parsing the Java command used to launch the worker, extracting the
* name of the properties file, and then loading the file. <br>
* The sink uses these properties, if available, when initializing its internal Kafka clients. By
* doing this, Kafka-related properties only need to be set in the worker properties and do not
* need to be duplicated in the sink config. <br>
* If the worker properties cannot be loaded, then Kafka-related properties must be set via the
* `iceberg.kafka.*` sink configs.
*
* @return The Kafka Connect worker properties
*/
private Map<String, String> loadWorkerProps() {
String javaCmd = System.getProperty("sun.java.command");
if (javaCmd != null && !javaCmd.isEmpty()) {
Expand Down

0 comments on commit c6808e1

Please sign in to comment.