apoorvmittal10 commented on code in PR #14843:
URL: https://github.com/apache/kafka/pull/14843#discussion_r1411708516


##########
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.");

Review Comment:
   Ack, will talk to @AndrewJSchofield today. Below update might be required in 
KIP.
   
   ```
   * @param timeout The maximum time to wait for producer client to determine 
its client instance ID.
        *                The value must be non-negative. Specifying a timeout 
of zero means do not
        *                wait for the initial request to complete if it hasn't 
already.
        * @throws InterruptException If the thread is interrupted while blocked.
        * @throws KafkaException If an unexpected error occurs while trying to 
determine the client
        *                        instance ID, though this error does not 
necessarily imply the
        *                        producer client is otherwise unusable.
        * @throws IllegalArgumentException If the {@code timeout} is negative.
        * @throws IllegalStateException If telemetry is not enabled ie, config 
`{@code enable.metrics.push}`
        *                               is set to `{@code false}`.
        * @return The client's assigned instance id used for metrics collection.



-- 
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

Reply via email to