kouki-tw commented on code in PR #24375:
URL: https://github.com/apache/kafka/pull/24375#discussion_r4698596802


##########
tests/kafkatest/services/performance/consumer_performance.py:
##########
@@ -80,6 +81,12 @@ def __init__(self, context, num_nodes, kafka, topic, 
messages, version=DEV_BRANC
         for node in self.nodes:
             node.version = version
 
+    def java_class_name(self):

Review Comment:
   Hi Chia-Ping Tsai, 
   thank you for your suggestion. I updated java_class_name() to take the 
target node and used "get_version(node)" to pick the right ConsumerPerformance 
class when stopping or cleaning up.
   
   ```python
   def get_version(node=None):
       """Return the version attached to the given node.
       Default to DEV_BRANCH if node or node.version is undefined (aka None)
       """
       if node is not None and hasattr(node, "version") and node.version is not 
None:
           return node.version
       else:
           return DEV_BRANCH
   ```
   Share Consumer and EndToEndLatency also override java_class_name(), so I 
updated both to accept node and avoid a TypeError in the shared stop and 
cleanup code. 
   
   EndToEndLatency calls the method at startup too, so I passed node there as 
well.
   
   tks.
   



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

Reply via email to