apoorvmittal10 commented on code in PR #14843: URL: https://github.com/apache/kafka/pull/14843#discussion_r1413029723
########## clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java: ########## @@ -4387,7 +4398,52 @@ public FenceProducersResult fenceProducers(Collection<String> transactionalIds, @Override public Uuid clientInstanceId(Duration timeout) { - throw new UnsupportedOperationException(); + if (timeout.isNegative()) { + throw new IllegalArgumentException("The timeout cannot be negative."); + } + + if (!clientTelemetryEnabled) { + throw new IllegalStateException("Telemetry is not enabled. Set config `" + AdminClientConfig.ENABLE_METRICS_PUSH_CONFIG + "` to `true`."); + } + + if (clientInstanceId != null) { + return clientInstanceId; + } + + final long now = time.milliseconds(); Review Comment: Same as above, the `KafkaAdminClient` again has other `42` occurrences with `long now = ....` and none with `long nowMs = ....` hence continued the consistency. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org